Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Commit

Permalink
Update condition for missing network (#119)
Browse files Browse the repository at this point in the history
* 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 <ssbarnea@redhat.com>
  • Loading branch information
jdmarble and ssbarnea committed Jul 20, 2022
1 parent 186a7f7 commit 649e3b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/molecule_podman/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']"

Expand Down

0 comments on commit 649e3b6

Please sign in to comment.