mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 07:05:27 +01:00
Compare commits
5 commits
b9feff586f
...
202609e425
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
202609e425 | ||
|
|
f1b36ba1c2 | ||
|
|
0eb6a7a437 | ||
|
|
15954f8def | ||
|
|
41ce2cc8f9 |
2 changed files with 10 additions and 6 deletions
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- firewall - Fix issue where opening a specific port resulted in opening the whole protocol of the specified port
|
||||||
|
|
@ -856,15 +856,16 @@ def main():
|
||||||
zone = module.params['zone']
|
zone = module.params['zone']
|
||||||
target = module.params['target']
|
target = module.params['target']
|
||||||
|
|
||||||
|
port = None
|
||||||
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_protocol = None
|
||||||
|
|
||||||
port_forward_toaddr = ''
|
port_forward_toaddr = ''
|
||||||
port_forward = None
|
port_forward = None
|
||||||
|
|
@ -981,7 +982,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 +994,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