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

28 lines
900 B
YAML
Raw Permalink Normal View History

2023-06-09 15:41:22 +02:00
---
- name: Clean up
hosts: all
gather_facts: true
tasks:
- name: "CALIBRE | Load the defaults."
ansible.builtin.include_vars:
dir: "../../defaults"
- name: "CALIBRE | Check if the docker-compose file exists."
ansible.builtin.stat:
path: "{{ calibre_config_path | expanduser | realpath }}/docker-compose.yml"
register: "docker_compose_file"
- name: "CALIBRE | Remove docker-compose."
community.docker.docker_compose:
project_src: "{{ calibre_config_path | expanduser | realpath }}/"
build: false
state: absent
when: "docker_compose_file.stat.exists"
become: false
- name: "CALIBRE | Remove the docker-compose file"
ansible.builtin.file:
path: "{{ calibre_config_path | expanduser | realpath }}/docker-compose.yml"
state: "absent"
when: "docker_compose_file.stat.exists"