2022-09-15 13:29:02 +02:00
|
|
|
---
|
|
|
|
- name: Destroy
|
|
|
|
hosts: localhost
|
|
|
|
connection: local
|
|
|
|
gather_facts: false
|
|
|
|
no_log: "{{ molecule_no_log }}"
|
|
|
|
tasks:
|
|
|
|
# Developer must implement.
|
2022-09-22 11:22:57 +02:00
|
|
|
- name: Remove the docker image
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: instance-authentik
|
|
|
|
state: absent
|
2022-09-15 13:29:02 +02:00
|
|
|
|
|
|
|
# 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
|