add a git pull before the commit/push to handle this gracefully when multiple nodes run sequentially

This commit is contained in:
2026-03-14 17:01:29 -07:00
parent e692388a56
commit 17cebecd31

View File

@@ -83,6 +83,14 @@
delegate_to: localhost
changed_when: false
- name: Git | Pull latest before committing
ansible.builtin.shell: |
cd {{ pve_config_git_repo_dir }}
git pull origin {{ pve_config_git_branch }} --rebase
delegate_to: localhost
when: git_status.stdout != ""
changed_when: false
- name: Git | Stage backup files
ansible.builtin.shell: |
cd {{ pve_config_git_repo_dir }}