mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 23:25:28 +01:00
fix firewalld protocol
This commit is contained in:
parent
b9feff586f
commit
41ce2cc8f9
1 changed files with 5 additions and 5 deletions
|
|
@ -858,10 +858,10 @@ def main():
|
||||||
|
|
||||||
if module.params['port'] is not None:
|
if module.params['port'] is not None:
|
||||||
if '/' in module.params['port']:
|
if '/' in module.params['port']:
|
||||||
port, protocol = module.params['port'].strip().split('/')
|
port, port_protocol = module.params['port'].strip().split('/')
|
||||||
else:
|
else:
|
||||||
protocol = None
|
port_protocol = None
|
||||||
if not protocol:
|
if not port_protocol:
|
||||||
module.fail_json(msg='improper port format (missing protocol?)')
|
module.fail_json(msg='improper port format (missing protocol?)')
|
||||||
else:
|
else:
|
||||||
port = None
|
port = None
|
||||||
|
|
@ -981,7 +981,7 @@ def main():
|
||||||
|
|
||||||
transaction = PortTransaction(
|
transaction = PortTransaction(
|
||||||
module,
|
module,
|
||||||
action_args=(port, protocol, timeout),
|
action_args=(port, port_protocol, timeout),
|
||||||
zone=zone,
|
zone=zone,
|
||||||
desired_state=desired_state,
|
desired_state=desired_state,
|
||||||
permanent=permanent,
|
permanent=permanent,
|
||||||
|
|
@ -993,7 +993,7 @@ def main():
|
||||||
if changed is True:
|
if changed is True:
|
||||||
msgs.append(
|
msgs.append(
|
||||||
"Changed port %s to %s" % (
|
"Changed port %s to %s" % (
|
||||||
"%s/%s" % (port, protocol), desired_state
|
"%s/%s" % (port, port_protocol), desired_state
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue