ansible-role-outline-wiki/molecule/default/cleanup.yml

24 lines
629 B
YAML
Raw Permalink Normal View History

2022-10-05 12:53:35 +02:00
---
- name: Clean up
hosts: all
gather_facts: true
tasks:
- name: Check if the docker-compose file exists.
ansible.builtin.stat:
path: "~/outline/docker-compose.yml"
register: docker_compose_file
- name: Remove docker-compose.
community.docker.docker_compose:
project_src: ~/outline/
build: false
state: absent
when: docker_compose_file.stat.exists
become: false
- name: Remove the docker-compose file
ansible.builtin.file:
path: "~/outline/docker-compose.yml"
state: absent
when: docker_compose_file.stat.exists