2018-12-28 11:23:49 +01:00
|
|
|
---
|
|
|
|
- name: is /etc clean?
|
|
|
|
command: git status --porcelain
|
|
|
|
args:
|
|
|
|
chdir: /etc
|
2020-06-01 11:37:15 +02:00
|
|
|
changed_when: false
|
2018-12-28 11:23:49 +01:00
|
|
|
register: git_status
|
|
|
|
when: not ansible_check_mode
|
2020-06-01 11:37:15 +02:00
|
|
|
ignore_errors: true
|
2018-12-28 11:23:49 +01:00
|
|
|
tags:
|
2020-05-22 17:49:18 +02:00
|
|
|
- commit-etc
|
2020-06-04 18:51:53 +02:00
|
|
|
# yamllint disable rule:line-length
|
2018-12-28 11:23:49 +01:00
|
|
|
- name: /etc modifications are committed
|
2020-06-04 18:51:53 +02:00
|
|
|
shell: >
|
|
|
|
git add -A .
|
|
|
|
&& git commit
|
2020-07-02 16:40:17 +02:00
|
|
|
-m "{{ commit_message | default('Ansible run') }}"
|
|
|
|
--author="{{ ansible_env.SUDO_USER | default('Root') }}"
|
|
|
|
"<{{ ansible_env.SUDO_USER | default('Root') }}@{{ general_technical_realm }}>"
|
2018-12-28 11:23:49 +01:00
|
|
|
args:
|
|
|
|
chdir: /etc
|
|
|
|
register: etc_commit_end_evolinux
|
|
|
|
when: not ansible_check_mode and git_status.stdout != ""
|
2020-06-01 11:37:15 +02:00
|
|
|
ignore_errors: true
|
2018-12-28 11:23:49 +01:00
|
|
|
tags:
|
2020-05-22 17:49:18 +02:00
|
|
|
- commit-etc
|
2020-06-04 18:51:53 +02:00
|
|
|
# yamllint enable rule:line-length
|