Skip to content

Commit

Permalink
Fix idempotency for podman_network (#699) (#700)
Browse files Browse the repository at this point in the history
* Fix idempotency for podman_network when explicitly definining disable_dns parameter for Podman driver other than type bridge

Signed-off-by: andreas.seidl <[email protected]>
  • Loading branch information
4ndyZ authored Jan 11, 2024
1 parent f9cbca5 commit eab26e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugins/modules/podman_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,7 @@ def _diff_update_and_compare(self, param_name, before, after):
def diffparam_disable_dns(self):
# For v3 it's impossible to find out DNS settings.
if LooseVersion(self.version) >= LooseVersion('4.0.0'):
if self.info.get('driver') == 'bridge':
before = not self.info.get('dns_enabled', True)
# for all other drivers except bridge DNS is disabled by default
else:
before = False
before = not self.info.get('dns_enabled', True)
after = self.params['disable_dns']
# compare only if set explicitly
if self.params['disable_dns'] is None:
Expand Down

0 comments on commit eab26e5

Please sign in to comment.