Patrick Marchand
98089a3274
In some cases I used block scalars: https://yaml-multiline.info/ In other cases I added newlines In rare cases I just ignored the rule: https://yamllint.readthedocs.io/en/stable/disable_with_comments.html
28 lines
738 B
YAML
28 lines
738 B
YAML
---
|
|
- name: is /etc clean?
|
|
command: git status --porcelain
|
|
args:
|
|
chdir: /etc
|
|
changed_when: false
|
|
register: git_status
|
|
when: not ansible_check_mode
|
|
ignore_errors: true
|
|
tags:
|
|
- commit-etc
|
|
# yamllint disable rule:line-length
|
|
- name: /etc modifications are committed
|
|
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') }}@{{ general_technical_realm }}>"
|
|
args:
|
|
chdir: /etc
|
|
register: etc_commit_end_evolinux
|
|
when: not ansible_check_mode and git_status.stdout != ""
|
|
ignore_errors: true
|
|
tags:
|
|
- commit-etc
|
|
# yamllint enable rule:line-length
|