ansible-role-authentik/molecule/default/cleanup.yml

24 lines
645 B
YAML
Raw Normal View History

2022-09-18 13:11:29 +02:00
---
- name: Clean up
hosts: all
gather_facts: true
2022-09-18 13:11:29 +02:00
tasks:
- name: Check if the docker-compose file exists.
ansible.builtin.stat:
path: "~/authentik/docker-compose.yml"
register: docker_compose_file
- name: Remove authentik docker-compose.
2022-09-22 11:22:57 +02:00
2022-09-18 13:11:29 +02:00
community.docker.docker_compose:
project_src: ~/authentik/
build: false
state: absent
when: docker_compose_file.stat.exists
become: false
2022-09-22 11:22:57 +02:00
2022-09-18 13:11:29 +02:00
- name: Remove the docker-compose file
ansible.builtin.file:
path: "~/authentik/docker-compose.yml"
state: absent
2022-09-22 11:22:57 +02:00
when: docker_compose_file.stat.exists