Adding fallback mechanism to ntp validation role
It the 'chrony_enabled' key isn't found by hiera, the validation will now proceed as if it was disabled. This should allow for successful run on clouds with mix of ntp implementations. Resolves: rhbz#2156049 Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: Ic9860b3531639e85926f5221cd9c5cde03eecfa8
This commit is contained in:
parent
978cd641f3
commit
879b056058
|
@ -1,8 +1,14 @@
|
||||||
---
|
---
|
||||||
- name: Get if chrony is enabled
|
- name: Get if chrony is enabled
|
||||||
become: true
|
become: true
|
||||||
hiera:
|
block:
|
||||||
name: "chrony_enabled"
|
- hiera:
|
||||||
|
name: "chrony_enabled"
|
||||||
|
rescue:
|
||||||
|
- debug:
|
||||||
|
msg: "chrony_enabled key is not present. Assuming chrony is disabled"
|
||||||
|
- set_fact:
|
||||||
|
chrony_enabled: false
|
||||||
|
|
||||||
- when: chrony_enabled|bool
|
- when: chrony_enabled|bool
|
||||||
block:
|
block:
|
||||||
|
|
Loading…
Reference in New Issue