diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml index da92c0b..ecaab8d 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/destroy.yml @@ -6,7 +6,7 @@ tasks: - name: find current container state ansible.builtin.command: lxc ls {{ item.name }} - register: container_state + register: state changed_when: false with_items: '{{ molecule_yml.platforms }}' - name: stop running containers @@ -14,5 +14,5 @@ cmd: | lxc stop {{ item.name }} && \ lxc rm {{ item.name }} - when: (container_state.results[0].rc == 0) and ("RUNNING" in container_state.results[0].stdout) + when: state.results[0].rc == 0 and "RUNNING" in state.results[0].stdout with_items: '{{ molecule_yml.platforms }}' diff --git a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml index a5855c8..9b08844 100644 --- a/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml +++ b/collections/ansible_collections/theliberatededge/test_linux_containers/extensions/molecule/default/verify.yml @@ -5,8 +5,8 @@ tasks: - name: find current container state ansible.builtin.command: lxc ls {{ item.name }} - register: container_state + register: state with_items: '{{ molecule_yml.platforms }}' - name: verify launched container is running assert: - that: (container_state.results[0].rc == 0) and ("RUNNING" in container_state.results[0].stdout) + that: state.results[0].rc == 0 and "RUNNING" in state.results[0].stdout