ansible-role-plausible/molecule/default/destroy.yml
Laur Ivan 347f54fd79 Fix files and templates.
Check if the GeoIP db exists and configure accordingly.
Move preparation tasks to prepare.yml.
Fix destroy.yml.
2022-09-22 09:43:03 +02:00

29 lines
721 B
YAML

---
- name: Destroy
hosts: localhost
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
tasks:
# Developer must implement.
- name: Remove the docker image
community.docker.docker_container:
name: instance
state: absent
# Mandatory configuration for Molecule to function.
- name: Populate instance config
ansible.builtin.set_fact:
instance_conf: {}
- name: 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