From 03f4d90ed0acdf85978432ec531c88d15518cd8b Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Sat, 8 Nov 2025 15:08:52 +0100 Subject: [PATCH] fix: Remove unsupported owner/group parameters from git module - ansible.builtin.git no longer supports owner and group parameters - Set ownership in separate file task after git operations - Fixes 'Unsupported parameters' error --- .../ansible/playbooks/deploy-application-code.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 }}"