ansible-role-plausible/molecule/default/cleanup.yml
Laur Ivan 11a819ea2f Add molecule files.
Add default variables.
Add empty templates.
2022-09-19 23:13:01 +02:00

21 lines
593 B
YAML

---
- name: Clean up
hosts: all
gather_facts: true
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.
community.docker.docker_compose:
project_src: ~/authentik/
build: false
state: absent
when: docker_compose_file.stat.exists
become: false
- name: Remove the docker-compose file
ansible.builtin.file:
path: "~/authentik/docker-compose.yml"
state: absent