|
213 | 213 | '''
|
214 | 214 |
|
215 | 215 | from ansible.module_utils.basic import AnsibleModule
|
| 216 | +from ansible.module_utils.parsing.convert_bool import boolean |
216 | 217 | from ansible_collections.ansible.posix.plugins.module_utils.firewalld import FirewallTransaction, fw_offline
|
217 | 218 |
|
218 | 219 | try:
|
@@ -875,6 +876,14 @@ def main():
|
875 | 876 | if changed is True:
|
876 | 877 | msgs.append("Changed icmp-block-inversion %s to %s" % (icmp_block_inversion, desired_state))
|
877 | 878 |
|
| 879 | + # Type of icmp_block_inversion will be changed to boolean in a future release. |
| 880 | + try: |
| 881 | + boolean(icmp_block_inversion, True) |
| 882 | + except TypeError: |
| 883 | + module.warn('The value of the icmp_block_inversion option is "%s". ' |
| 884 | + 'The type of the option will be changed from string to boolean in a future release. ' |
| 885 | + 'To avoid unexpected behavior, please change the value to boolean.' % icmp_block_inversion) |
| 886 | + |
878 | 887 | if service is not None:
|
879 | 888 |
|
880 | 889 | transaction = ServiceTransaction(
|
@@ -992,6 +1001,14 @@ def main():
|
992 | 1001 | changed, transaction_msgs = transaction.run()
|
993 | 1002 | msgs = msgs + transaction_msgs
|
994 | 1003 |
|
| 1004 | + # Type of masquerade will be changed to boolean in a future release. |
| 1005 | + try: |
| 1006 | + boolean(masquerade, True) |
| 1007 | + except TypeError: |
| 1008 | + module.warn('The value of the masquerade option is "%s". ' |
| 1009 | + 'The type of the option will be changed from string to boolean in a future release. ' |
| 1010 | + 'To avoid unexpected behavior, please change the value to boolean.' % masquerade) |
| 1011 | + |
995 | 1012 | if target is not None:
|
996 | 1013 |
|
997 | 1014 | transaction = ZoneTargetTransaction(
|
|
0 commit comments