Skip to content

Commit

Permalink
[pfsense_nat_outbound] Fix boolean values, invert. (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jan 4, 2024
1 parent b5c56d6 commit 765a74c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions plugins/module_utils/nat_outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,10 @@ def _params_to_obj(self):
self._get_ansible_param(obj, 'poolopts')
self._get_ansible_param(obj, 'source_hash_key')
self._get_ansible_param(obj, 'natport')
self._get_ansible_param_bool(obj, 'disabled')
self._get_ansible_param_bool(obj, 'nonat')
self._get_ansible_param_bool(obj, 'invert')
self._get_ansible_param_bool(obj, 'staticnatport')
self._get_ansible_param_bool(obj, 'nosync')
self._get_ansible_param_bool(obj, 'disabled', value='')
self._get_ansible_param_bool(obj, 'nonat', value='')
self._get_ansible_param_bool(obj, 'staticnatport', value='')
self._get_ansible_param_bool(obj, 'nosync', value='')

if 'after' in self.params and self.params['after'] is not None:
self.after = self.params['after']
Expand All @@ -102,6 +101,8 @@ def _params_to_obj(self):

self._parse_address(obj, 'source', 'sourceport', True, 'network')
self._parse_address(obj, 'destination', 'dstport', False, 'address')
if self.params['invert']:
obj['destination']['not'] = None
self._parse_translated_address(obj)

if obj['source_hash_key'] != '' and not obj['source_hash_key'].startswith('0x'):
Expand Down

0 comments on commit 765a74c

Please sign in to comment.