swift: ensure we get rsyslog state "--check" mode

Ensure that the logging forwarding tasks do not fail in ansible check
mode, and we make sure the rsyslog_config is actually defined.

Change-Id: Ifaf692643f21f2ae30557b251ae58a9b32fbb143
Closes-Bug: #1835415
(cherry picked from commit 58bf8a207b)
This commit is contained in:
Emilien Macchi 2019-07-04 09:40:14 -04:00
parent 7b3df6196d
commit e022668a0c
2 changed files with 6 additions and 2 deletions

View File

@ -482,7 +482,9 @@ outputs:
service: name=rsyslog state=restarted
when:
- logconfig is changed
when: rsyslog_config.rc == 0
when:
- rsyslog_config is changed
- rsyslog_config.rc == 0
update_tasks:
- name: Check swift containers log folder/symlink exists
stat:

View File

@ -623,7 +623,9 @@ outputs:
service: name=rsyslog state=restarted
when:
- logconfig is changed
when: rsyslog_config.rc == 0
when:
- rsyslog_config is changed
- rsyslog_config.rc == 0
- name: Set fact for SwiftRawDisks
set_fact:
swift_raw_disks: {get_param: SwiftRawDisks}