2022-09-09 21:24:34 +00:00
|
|
|
---
|
|
|
|
# This is a Hello World playbook to execute Ansible tests.
|
|
|
|
|
|
|
|
- name: Verify
|
|
|
|
hosts: all
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
2023-04-12 22:29:29 +00:00
|
|
|
- ansible.builtin.include_vars:
|
2022-09-11 16:07:18 +00:00
|
|
|
file: ../../defaults/main.yml
|
|
|
|
|
2022-09-09 21:24:34 +00:00
|
|
|
- name: Try and stop and remove Hello World
|
2023-04-15 13:11:49 +00:00
|
|
|
community.docker.docker_container:
|
2022-09-11 16:07:18 +00:00
|
|
|
name: "{{ hello_world_container_name }}"
|
2022-09-09 21:24:34 +00:00
|
|
|
state: absent
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- name: Check Hello World is stopped
|
2023-04-12 22:29:29 +00:00
|
|
|
ansible.builtin.assert:
|
2022-09-09 21:24:34 +00:00
|
|
|
that:
|
|
|
|
- not result.changed
|