fix: Remove unsupported owner/group parameters from git module
Some checks failed
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 28s
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 28s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 9s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 10s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 43s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped

- ansible.builtin.git no longer supports owner and group parameters
- Set ownership in separate file task after git operations
- Fixes 'Unsupported parameters' error
This commit is contained in:
2025-11-08 15:08:52 +01:00
parent 2f98c52300
commit 03f4d90ed0

View File

@@ -51,8 +51,6 @@
version: "{{ git_branch }}" version: "{{ git_branch }}"
force: no force: no
update: no update: no
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
when: not git_repo_exists.stat.exists when: not git_repo_exists.stat.exists
environment: environment:
GIT_TERMINAL_PROMPT: "0" GIT_TERMINAL_PROMPT: "0"
@@ -66,14 +64,20 @@
version: "{{ git_branch }}" version: "{{ git_branch }}"
force: yes force: yes
update: yes update: yes
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
when: git_repo_exists.stat.exists when: git_repo_exists.stat.exists
environment: environment:
GIT_TERMINAL_PROMPT: "0" GIT_TERMINAL_PROMPT: "0"
vars: vars:
ansible_become: no 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 - name: Ensure executable permissions on PHP scripts
file: file:
path: "{{ application_code_dest }}/{{ item }}" path: "{{ application_code_dest }}/{{ item }}"