2016-12-21 15:39:50 +01:00
|
|
|
---
|
|
|
|
- name: is /etc clean?
|
|
|
|
command: git status --porcelain
|
|
|
|
args:
|
|
|
|
chdir: /etc
|
|
|
|
changed_when: False
|
|
|
|
register: git_status
|
2017-03-30 16:32:16 +02:00
|
|
|
when: not ansible_check_mode
|
2017-02-07 17:47:49 +01:00
|
|
|
ignore_errors: yes
|
2016-12-21 15:39:50 +01:00
|
|
|
tags:
|
2017-03-30 22:24:26 +02:00
|
|
|
- commit-etc
|
2016-12-21 15:39:50 +01:00
|
|
|
|
|
|
|
- name: /etc modifications are committed
|
2017-07-19 17:12:55 +02:00
|
|
|
shell: "git add -A . && git commit -m \"{{ commit_message | default('Ansible run') }}\" --author=\"{{ ansible_env.SUDO_USER | default('Root') }} <{{ ansible_env.SUDO_USER | default('Root') }}@evolix.net>\""
|
2016-12-21 15:39:50 +01:00
|
|
|
args:
|
|
|
|
chdir: /etc
|
|
|
|
register: etc_commit_end_evolinux
|
2017-03-30 16:11:41 +02:00
|
|
|
when: not ansible_check_mode and git_status.stdout != ""
|
2017-02-07 17:47:49 +01:00
|
|
|
ignore_errors: yes
|
2016-12-21 15:39:50 +01:00
|
|
|
tags:
|
2017-03-30 22:24:26 +02:00
|
|
|
- commit-etc
|