File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
plugins/module_utils/podman
tests/integration/targets/podman_container_idempotency/tasks Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -909,7 +909,7 @@ def diffparam_env(self):
909909
910910 def diffparam_etc_hosts (self ):
911911 if self .info ['hostconfig' ]['extrahosts' ]:
912- before = dict ([i .split (":" )
912+ before = dict ([i .split (":" , 1 )
913913 for i in self .info ['hostconfig' ]['extrahosts' ]])
914914 else :
915915 before = {}
Original file line number Diff line number Diff line change 242242 - test18 is not changed
243243 - test19 is changed
244244
245+ - name : Run container with etc_hosts
246+ containers.podman.podman_container :
247+ executable : " {{ test_executable | default('podman') }}"
248+ image : " {{ idem_image }}"
249+ name : idempotency
250+ state : present
251+ etc_hosts :
252+ host1 : 127.0.0.1
253+ host2 : fd00::1
254+ command : 1h
255+ register : test20
256+
257+ - name : Check info with etc_hosts
258+ assert :
259+ that : test20 is changed
260+
261+ - name : Run container with etc_hosts again
262+ containers.podman.podman_container :
263+ executable : " {{ test_executable | default('podman') }}"
264+ image : " {{ idem_image }}"
265+ name : idempotency
266+ state : present
267+ etc_hosts :
268+ host1 : 127.0.0.1
269+ host2 : fd00::1
270+ command : 1h
271+ register : test21
272+
273+ - name : Check info with etc_hosts again
274+ assert :
275+ that : test21 is not changed
276+
245277- name : Remove test container
246278 containers.podman.podman_container :
247279 executable : " {{ test_executable | default('podman') }}"
You can’t perform that action at this time.
0 commit comments