mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Check to make sure the firewalld client is connected before proceeding.
Fixes #1138 Original patch referenced in https://github.com/ansible/ansible/issues/6911 (f547733b1f) was undone by6f2b61d2d8
This commit is contained in:
committed by
Matt Clay
parent
17e9b85228
commit
f9383cb8ef
@@ -98,7 +98,10 @@ try:
|
|||||||
from firewall.client import Rich_Rule
|
from firewall.client import Rich_Rule
|
||||||
from firewall.client import FirewallClient
|
from firewall.client import FirewallClient
|
||||||
fw = FirewallClient()
|
fw = FirewallClient()
|
||||||
HAS_FIREWALLD = True
|
if not fw.connected:
|
||||||
|
HAS_FIREWALLD = False
|
||||||
|
else:
|
||||||
|
HAS_FIREWALLD = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_FIREWALLD = False
|
HAS_FIREWALLD = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user