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

Fix podman_pod* modules for Podman v3 (#207)

Fix network in podman_pod modules for Podman v3
This commit is contained in:
Sergey 2021-02-23 15:57:25 +02:00 committed by GitHub
parent 44d266dc3e
commit 9f45c40ea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -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/**'

View file

@ -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/**'

View file

@ -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']: