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:
parent
405c3cb2c7
commit
c4c7e43020
1 changed files with 4 additions and 1 deletions
|
@ -97,7 +97,10 @@ try:
|
|||
|
||||
from firewall.client import FirewallClient
|
||||
fw = FirewallClient()
|
||||
HAS_FIREWALLD = True
|
||||
if not fw.connected:
|
||||
HAS_FIREWALLD = False
|
||||
else:
|
||||
HAS_FIREWALLD = True
|
||||
except ImportError:
|
||||
HAS_FIREWALLD = False
|
||||
|
||||
|
|
Loading…
Reference in a new issue