---
- hosts: aws

  vars:
    http_host: clientes.siglodelhombre.com
    base_path: /var/www/html/terceros
    php_exec: /usr/bin/php8.1
    composer: /usr/local/bin/composer2
    release_console_path: "{{ ansistrano_release_path.stdout }}/bin/console"

    ansistrano_deploy_to: "{{ base_path }}"
    ansistrano_keep_releases: 3

    ansistrano_shared_paths:
      - var/app
      - var/log

    ansistrano_deploy_via: git
    ansistrano_git_branch: master
    ansistrano_git_repo: git@github.com:siglodelhombreeditores/terceros.git
    ansistrano_git_identity_key_path: "{{ playbook_dir }}/id_rsa"

    ansistrano_after_symlink_shared_tasks_file: "{{ playbook_dir }}/hooks/after-symlink-shared.yml"
    ansistrano_after_cleanup_tasks_file: "{{ playbook_dir }}/hooks/after-cleanup.yml"

  vars_files:
    - ./vars/deploy-vault.yml
    - ./vars/deploy-vars.yml

  become: yes
  become_method: sudo
  become_user: www-data
  become_flags: '-u sh'

  roles:
    - ansistrano.deploy
