From 649e3b69212c23c672ad33817c92668aa72c19fa Mon Sep 17 00:00:00 2001 From: "James D. Marble" Date: Wed, 20 Jul 2022 08:15:15 -0700 Subject: [PATCH] Update condition for missing network (#119) * Update condition for missing network Network creation wasn't working for me until I changed this condition to look for the string `'network not found'` instead of `'no such network'`. I can't tell, but maybe this worked in the past and the message changed. It is currently defined [here](https://github.com/containers/common/blob/707829f80bc7623c6ecea000f2616977e178ccb5/libnetwork/types/define.go#L11). fixes #28 * Fix condition Co-authored-by: Sorin Sbarnea --- src/molecule_podman/playbooks/create.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/molecule_podman/playbooks/create.yml b/src/molecule_podman/playbooks/create.yml index 817a630..8a6f2ce 100644 --- a/src/molecule_podman/playbooks/create.yml +++ b/src/molecule_podman/playbooks/create.yml @@ -136,7 +136,8 @@ "{{ podman_network.results[0].ansible_loop.allitems[0].subnet | default(omit) }}" when: - podman_network.results[0].msg is defined - - "'no such network' in podman_network.results[0].msg" + # podman message changed at some point in time + - "'no such network' in podman_network.results[0].msg or 'network not found' in podman_network.results[0].msg" - podman_network.results[0].networks is undefined - "podman_network.results[0].ansible_loop.allitems[0].network not in ['bridge', 'none', 'host', 'ns', 'private', 'slirp4netns']"