mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-13 16:15:21 +01:00
Compare commits
2 commits
330cec2caf
...
1e4b9b692b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e4b9b692b | ||
|
|
ad2ac28ba6 |
2 changed files with 24 additions and 4 deletions
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
breaking_changes:
|
||||
- firewalld - Changed the type of forward and masquerade options from str to bool (https://github.com/ansible-collections/ansible.posix/issues/582).
|
||||
minor_changes:
|
||||
- firewalld - Changed the type of the forward option from str to bool (https://github.com/ansible-collections/ansible.posix/issues/582).
|
||||
|
|
|
|||
|
|
@ -1128,7 +1128,17 @@ def main():
|
|||
changed, transaction_msgs = transaction.run()
|
||||
msgs = msgs + transaction_msgs
|
||||
|
||||
expected_state = 'enabled' if (desired_state == 'enabled') == forward else 'disabled'
|
||||
if forward is not None:
|
||||
# Type of forward will be changed to boolean in a future release.
|
||||
forward_status = False
|
||||
try:
|
||||
forward_status = boolean(forward, False)
|
||||
except TypeError:
|
||||
module.warn('The value of the forward option is "%s". '
|
||||
'The type of the option will be changed from string to boolean in a future release. '
|
||||
'To avoid unexpected behavior, please change the value to boolean.' % forward)
|
||||
|
||||
expected_state = 'enabled' if (desired_state == 'enabled') == forward_status else 'disabled'
|
||||
transaction = ForwardTransaction(
|
||||
module,
|
||||
action_args=(),
|
||||
|
|
@ -1141,7 +1151,17 @@ def main():
|
|||
changed, transaction_msgs = transaction.run()
|
||||
msgs = msgs + transaction_msgs
|
||||
|
||||
expected_state = 'enabled' if (desired_state == 'enabled') == masquerade else 'disabled'
|
||||
if masquerade is not None:
|
||||
# Type of masquerade will be changed to boolean in a future release.
|
||||
masquerade_status = True
|
||||
try:
|
||||
masquerade_status = boolean(masquerade, True)
|
||||
except TypeError:
|
||||
module.warn('The value of the masquerade option is "%s". '
|
||||
'The type of the option will be changed from string to boolean in a future release. '
|
||||
'To avoid unexpected behavior, please change the value to boolean.' % masquerade)
|
||||
|
||||
expected_state = 'enabled' if (desired_state == 'enabled') == masquerade_status else 'disabled'
|
||||
transaction = MasqueradeTransaction(
|
||||
module,
|
||||
action_args=(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue