ansible-public/tasks/commit_etc_git.yml

19 lines
353 B
YAML

---
- name: is /etc clean?
command: git status --porcelain
args:
chdir: /etc
changed_when: False
register: git_status
tags:
- git
- name: /etc modifications are committed
shell: "git add -A . && git commit -m \"Ansible run\""
args:
chdir: /etc
register: etc_commit_end_evolinux
when: git_status.stdout != ""
tags:
- git