infra: don't restart firewalld if unit is masked

if firewalld.service systemd unit is masked, the handler will fail when
trying to restart it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1650281

(cherry picked from commit 63b9835cbb)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3351/head v3.2.0rc4
Guillaume Abrioux 2018-11-15 21:56:11 +01:00 committed by Sébastien Han
parent c96af4bac9
commit abdc245ceb
2 changed files with 6 additions and 0 deletions

View File

@ -239,3 +239,6 @@
- ceph_current_status['servicemap'] is defined - ceph_current_status['servicemap'] is defined
- ceph_current_status['servicemap']['services'] is defined - ceph_current_status['servicemap']['services'] is defined
- ceph_current_status['servicemap']['services']['rgw'] is defined - ceph_current_status['servicemap']['services']['rgw'] is defined
- name: populate service facts
service_facts:

View File

@ -4,3 +4,6 @@
name: firewalld name: firewalld
state: restarted state: restarted
enabled: yes enabled: yes
when:
- ansible_facts['services']['firewalld.service'] is defined
- ansible_facts['services']['firewalld.service']['state'] != 'masked'