1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-04-30 04:48:49 +00:00

Fix idempotency for podman_network (#699) (#700)

* Fix idempotency for podman_network when explicitly definining disable_dns parameter for Podman driver other than type bridge

Signed-off-by: andreas.seidl <andreas.seidl@r-kom.de>
This commit is contained in:
Andreas Seidl 2024-01-11 13:13:32 +01:00 committed by GitHub
parent f9cbca5582
commit eab26e5eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -348,11 +348,7 @@ class PodmanNetworkDiff:
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: