Added teardown

This commit is contained in:
Manuel Forcén Muñoz 2024-10-19 19:11:41 +02:00
parent 5a8faf7d56
commit e50d1309af

15
teardown.yml Normal file
View file

@ -0,0 +1,15 @@
---
- name: Creating compose from template
hosts: server
gather_facts: false
tasks:
- name: Tearing down Compose file
community.docker.docker_compose_v2:
project_src: /opt/infra
files:
- compose.yml
state: absent
remove_volumes: true
- name: Deleting infra folder contents
ansible.builtin.command: rm -r /opt/infra/*