diff --git a/.github/workflows/podman_pod.yml b/.github/workflows/podman_pod.yml index 575d78b..8a6ca58 100644 --- a/.github/workflows/podman_pod.yml +++ b/.github/workflows/podman_pod.yml @@ -7,6 +7,7 @@ on: - 'ci/*.yml' - 'ci/run_containers_tests.sh' - 'ci/playbooks/containers/podman_pod.yml' + - 'plugins/module_utils/podman/podman_pod_lib.py' - 'plugins/modules/podman_pod.py' - 'plugins/modules/podman_pod_info.py' - 'tests/integration/targets/podman_pod/**' @@ -18,6 +19,7 @@ on: - 'ci/*.yml' - 'ci/run_containers_tests.sh' - 'ci/playbooks/containers/podman_pod.yml' + - 'plugins/module_utils/podman/podman_pod_lib.py' - 'plugins/modules/podman_pod.py' - 'plugins/modules/podman_pod_info.py' - 'tests/integration/targets/podman_pod/**' diff --git a/.github/workflows/podman_pod_info.yml b/.github/workflows/podman_pod_info.yml index 595e4fb..0a1bd87 100644 --- a/.github/workflows/podman_pod_info.yml +++ b/.github/workflows/podman_pod_info.yml @@ -7,6 +7,7 @@ on: - 'ci/*.yml' - 'ci/run_containers_tests.sh' - 'ci/playbooks/containers/podman_pod_info.yml' + - 'plugins/module_utils/podman/podman_pod_lib.py' - 'plugins/modules/podman_pod.py' - 'plugins/modules/podman_pod_info.py' - 'tests/integration/targets/podman_pod_info/**' @@ -18,6 +19,7 @@ on: - 'ci/*.yml' - 'ci/run_containers_tests.sh' - 'ci/playbooks/containers/podman_pod_info.yml' + - 'plugins/module_utils/podman/podman_pod_lib.py' - 'plugins/modules/podman_pod.py' - 'plugins/modules/podman_pod_info.py' - 'tests/integration/targets/podman_pod_info/**' diff --git a/plugins/module_utils/podman/podman_pod_lib.py b/plugins/module_utils/podman/podman_pod_lib.py index c3f0e4e..ac0b5cc 100644 --- a/plugins/module_utils/podman/podman_pod_lib.py +++ b/plugins/module_utils/podman/podman_pod_lib.py @@ -341,7 +341,10 @@ class PodmanPodDiff: return self._diff_update_and_compare('network', [], []) net_mode_before = self.infra_info['hostconfig']['networkmode'] net_mode_after = '' - before = self.infra_info['networksettings'].get('networks', []) + before = list(self.infra_info['networksettings'].get('networks', {})) + # Remove default 'podman' network in v3 for comparison + if before == ['podman']: + before = [] after = self.params['network'] # Currently supported only 'host' and 'none' network modes idempotency if after in ['bridge', 'host', 'slirp4netns']: