This commit is contained in:
parent
f81e408e11
commit
a9e415eae5
@ -10,14 +10,14 @@
|
|||||||
- name: Check main rsyslog.conf
|
- name: Check main rsyslog.conf
|
||||||
block:
|
block:
|
||||||
- name: Compare main configuration file
|
- name: Compare main configuration file
|
||||||
command: diff -q {{ repo_root }}/files/rsyslog.conf {{ rsyslog_main_config }}
|
command: diff {{ repo_root }}/files/rsyslog.conf {{ rsyslog_main_config }}
|
||||||
register: main_diff
|
register: main_diff
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Fail if main config has drift
|
- name: Fail if main config has drift
|
||||||
fail:
|
fail:
|
||||||
msg: "{{ lookup('file', repo_root + '/files/rsyslog.conf') | diff([lookup('file', rsyslog_main_config)]) }}"
|
msg: "Main rsyslog.conf has drifted from Git. ({{ main_diff.stdout | default('no diff output') }})"
|
||||||
when: main_diff.rc != 0
|
when: main_diff.rc != 0
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: main_drift
|
register: main_drift
|
||||||
@ -36,7 +36,7 @@
|
|||||||
register: repo_configs
|
register: repo_configs
|
||||||
|
|
||||||
- name: Compare each config file
|
- name: Compare each config file
|
||||||
command: diff -q {{ item.path }} {{ rsyslog_config_dir }}/{{ item.path | basename }}
|
command: diff {{ item.path }} {{ rsyslog_config_dir }}/{{ item.path | basename }}
|
||||||
register: file_diffs
|
register: file_diffs
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user