From: Guillaume Abrioux Date: Thu, 15 Nov 2018 20:56:11 +0000 (+0100) Subject: infra: don't restart firewalld if unit is masked X-Git-Tag: v3.2.0rc4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=abdc245cebf2d2a74ee395c43ba9290deb792eb3;p=ceph-ansible.git 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 63b9835cbb0510415a2d0077697a0107e2d6c4f3) Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-defaults/tasks/facts.yml b/roles/ceph-defaults/tasks/facts.yml index 8c1ddf652..45d7bba6e 100644 --- a/roles/ceph-defaults/tasks/facts.yml +++ b/roles/ceph-defaults/tasks/facts.yml @@ -239,3 +239,6 @@ - ceph_current_status['servicemap'] is defined - ceph_current_status['servicemap']['services'] is defined - ceph_current_status['servicemap']['services']['rgw'] is defined + +- name: populate service facts + service_facts: diff --git a/roles/ceph-infra/handlers/main.yml b/roles/ceph-infra/handlers/main.yml index 5a9d52410..dc97de47b 100644 --- a/roles/ceph-infra/handlers/main.yml +++ b/roles/ceph-infra/handlers/main.yml @@ -4,3 +4,6 @@ name: firewalld state: restarted enabled: yes + when: + - ansible_facts['services']['firewalld.service'] is defined + - ansible_facts['services']['firewalld.service']['state'] != 'masked' \ No newline at end of file