ansible-role-macvlan/molecule/default/destroy.yml

28 lines
796 B
YAML
Raw Permalink Normal View History

2023-09-29 15:17:33 +02:00
---
2023-09-29 15:50:21 +02:00
- name: "MACVLAN | Destroy"
hosts: "localhost"
connection: "local"
2023-09-29 15:17:33 +02:00
gather_facts: false
2023-09-29 15:50:21 +02:00
no_log: "{{ molecule_no_log }}"
2023-09-29 15:17:33 +02:00
tasks:
# Developer must implement.
2023-09-29 15:50:21 +02:00
- name: "MACVLAN | Remove the docker image"
community.docker.docker_container:
name: "MACVLAN"
state: "absent"
2023-09-29 15:17:33 +02:00
# Mandatory configuration for Molecule to function.
2023-09-29 15:50:21 +02:00
- name: "MACVLAN | Populate instance config"
2023-09-29 15:17:33 +02:00
ansible.builtin.set_fact:
instance_conf: {}
2023-09-29 15:50:21 +02:00
- name: "MACVLAN | Dump instance config"
2023-09-29 15:17:33 +02:00
ansible.builtin.copy:
content: |
# Molecule managed
{{ instance_conf | to_json | from_json | to_yaml }}
dest: "{{ molecule_instance_config }}"
mode: 0600
2023-09-29 15:50:21 +02:00
when: "server.changed | default(false) | bool" # noqa no-handler