ansible-role-calibre/molecule/default/destroy.yml
2023-06-09 15:41:22 +02:00

28 lines
777 B
YAML

---
- name: "CALIBRE | Destroy"
hosts: "localhost"
connection: "local"
gather_facts: false
no_log: "{{ molecule_no_log }}"
tasks:
# Developer must implement.
- name: "CALIBRE | Remove the docker image"
community.docker.docker_container:
name: "calibre"
state: "absent"
# Mandatory configuration for Molecule to function.
- name: "CALIBRE | Populate instance config"
ansible.builtin.set_fact:
instance_conf: {}
- name: "CALIBRE | Dump instance config"
ansible.builtin.copy:
content: |
# Molecule managed
{{ instance_conf | to_json | from_json | to_yaml }}
dest: "{{ molecule_instance_config }}"
mode: 0600
when: "server.changed | default(false) | bool"