ansible-nas/roles/drone-ci/molecule/default/verify_stopped.yml

27 lines
625 B
YAML
Raw Normal View History

2022-11-06 23:26:26 +00:00
---
- name: Verify
hosts: all
gather_facts: false
tasks:
2023-03-09 14:17:27 +00:00
- name: Include vars
include_vars:
2022-11-06 23:26:26 +00:00
file: ../../defaults/main.yml
- name: Try and stop and remove Drone CI
docker_container:
name: "{{ drone_ci_container_name }}"
state: absent
register: result
- name: Try and stop and remove Drone CI runner
docker_container:
name: "{{ drone_ci_runner_container_name }}"
state: absent
register: result_runner
- name: Check Drone CI is stopped
assert:
that:
- not result.changed
- not result_runner.changed