60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
---
|
|
- name: Set the permissions on {{ ansistrano_shared_path }}
|
|
become: yes
|
|
file:
|
|
path: "{{ ansistrano_shared_path }}"
|
|
state: directory
|
|
# mode: 0750
|
|
owner: "{{ create_user }}"
|
|
group: www-data
|
|
recurse: yes
|
|
|
|
- name: Set the permissions on {{ ansistrano_release_path.stdout }}
|
|
become: yes
|
|
file:
|
|
path: "{{ ansistrano_release_path.stdout }}"
|
|
state: directory
|
|
# mode: 0750
|
|
owner: "{{ create_user }}"
|
|
group: www-data
|
|
recurse: yes
|
|
|
|
- name: composer install dependencies
|
|
become: no
|
|
community.general.composer:
|
|
command: install
|
|
working_dir: "{{ ansistrano_release_path.stdout }}"
|
|
prefer_dist: yes
|
|
no_dev: false
|
|
|
|
- name: Set permissions on tmp and logs
|
|
ansible.posix.acl:
|
|
path: "{{ ansistrano_shared_path }}/{{item}}"
|
|
entity: www-data
|
|
etype: group
|
|
permissions: rwx
|
|
default: yes
|
|
state: present
|
|
with_items:
|
|
- tmp
|
|
- logs
|
|
|
|
- name: Set permissions on tmp and logs in {{ ansistrano_release_path.stdout }}
|
|
ansible.posix.acl:
|
|
path: "{{ ansistrano_release_path.stdout }}/{{item}}"
|
|
entity: www-data
|
|
etype: group
|
|
permissions: rwx
|
|
default: yes
|
|
state: present
|
|
with_items:
|
|
- tmp
|
|
- logs
|
|
|
|
#When writing your custom tasks files you may need some variables that Ansistrano makes available to you:
|
|
#
|
|
#{{ ansistrano_release_path.stdout }}: Path to current deployment release (probably the one you are going to use the most)
|
|
#{{ ansistrano_releases_path }}: Path to releases folder
|
|
#{{ ansistrano_shared_path }}: Path to shared folder (where common releases assets can be stored)
|
|
#{{ ansistrano_release_version }}: Relative directory name for the release (by default equals to the current timestamp in UTC timezone)
|