Skip to content

Commit

Permalink
Check the availability of the current_release folder
Browse files Browse the repository at this point in the history
  • Loading branch information
thib-info committed Nov 20, 2023
1 parent 79f25d0 commit 8b1ad88
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tasks/wordpress/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@
register: project_current_release_exist
when: new_build_to_deploy is defined and new_build_to_deploy

- name: Create current release directory
ansible.builtin.file:
path: "{{ steamengine_project_wordpress_current_release_path }}"
state: directory
owner: "{{ steamengine_project_user }}"
group: "{{ steamengine_app_user }}"
mode: u=rw,g=rw,o=
when: new_build_to_deploy is defined and new_build_to_deploy and not project_current_release_exist.stat.exists

- name: "Ensure {{ steamengine_project_wordpress_uploads_path }} has the right permissions"
ansible.builtin.file:
path: "{{ steamengine_project_wordpress_uploads_path }}"
Expand Down Expand Up @@ -136,7 +145,7 @@
state: link
owner: "{{ steamengine_project_user }}"
group: "{{ steamengine_app_user }}"
when: new_build_to_deploy is defined and new_build_to_deploy
when: new_build_to_deploy is defined and new_build_to_deploy and project_current_release_exist.stat.exists

- name: "Ensure {{ steamengine_project_wordpress_current_release_path }} has the right permissions"
ansible.builtin.file:
Expand Down

0 comments on commit 8b1ad88

Please sign in to comment.