diff --git a/deployment/ansible/playbooks/deploy-application-code.yml b/deployment/ansible/playbooks/deploy-application-code.yml index e5c0b322..2e4b55a0 100644 --- a/deployment/ansible/playbooks/deploy-application-code.yml +++ b/deployment/ansible/playbooks/deploy-application-code.yml @@ -51,8 +51,6 @@ version: "{{ git_branch }}" force: no update: no - owner: "{{ ansible_user }}" - group: "{{ ansible_user }}" when: not git_repo_exists.stat.exists environment: GIT_TERMINAL_PROMPT: "0" @@ -66,14 +64,20 @@ version: "{{ git_branch }}" force: yes update: yes - owner: "{{ ansible_user }}" - group: "{{ ansible_user }}" when: git_repo_exists.stat.exists environment: GIT_TERMINAL_PROMPT: "0" vars: ansible_become: no + - name: Set ownership of repository files + file: + path: "{{ application_code_dest }}" + owner: "{{ ansible_user }}" + group: "{{ ansible_user }}" + recurse: yes + become: yes + - name: Ensure executable permissions on PHP scripts file: path: "{{ application_code_dest }}/{{ item }}"