---
- hosts: "{{target}}"
  user: root
  become: true
  become_user: apache
  roles:
    - servergrove.symfony2
  vars:
    symfony_project_root: /var/www/vhosts/embracing.rmc.ca
    symfony_project_name: RMC Embracing Differences
    symfony_project_composer_path: "{{symfony_project_root}}/shared/composer.phar"
    symfony_project_repo: git@gitlab.com:nobletsolutions/rmc/ed-frontend.git
    symfony_project_env: prod
    symfony_project_console_command: bin/console
    symfony_project_config_dir: config
    symfony_project_console_opts: '--no-debug'
#    symfony_project_manage_composer: true
    symfony_project_branch: master
    symfony_project_php_path: /usr/bin/php73
    symfony_project_php_options: ''
#    symfony_project_composer_opts: '--no-dev --optimize-autoloader --no-interaction'
#    symfony_project_parameters_file: parameters.yml
    symfony_project_composer_opts: '--optimize-autoloader --no-interaction'
    symfony_project_shared_folders: # folders to be linked from shared directory to release dir
      - {name: logs, src: var/logs, path: var/logs}
      - {name: uploads, src: public/uploads, path: public/uploads}
    symfony_project_managed_folders: # folders to be created/checked in release dir
      - {name: cache, path: var/cache}
#      - {name: sessions, path: var/sessions}
#    symfony_project_pre_cache_warmup_tasks: "{{inventory_dir}}/hooks/pre_cache_warmup.yml"

  tasks:
    -   name: Reload php-fpm
        service: name=php73-php-fpm state=reloaded
        become: false
