43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
---
|
|
- name: Make way for shared paths / resources shared across releases
|
|
file:
|
|
state=absent
|
|
path={{ansistrano_release_path.stdout}}/{{item}}
|
|
with_items: ansistrano_shared_paths
|
|
|
|
- name: Add app_local.php config file
|
|
template:
|
|
dest: "{{ ansistrano_release_path.stdout }}/config/app_local.php"
|
|
src: config/app_local.php.j2
|
|
|
|
- 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: run cakephp script - {{ item.name }}
|
|
command: bin/cake {{ item.script }}
|
|
args:
|
|
chdir: "{{ ansistrano_release_path.stdout }}"
|
|
loop: "{{ cakephp_deploy_scripts }}"
|
|
|
|
#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)
|