This commit is contained in:
parent
bd53c2d502
commit
a93b006a52
@ -5,10 +5,14 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
no_log: "{{ molecule_no_log }}"
|
no_log: "{{ molecule_no_log }}"
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Check existing instance config file
|
||||||
|
stat:
|
||||||
|
path: "{{ molecule_instance_config }}"
|
||||||
|
register: cfg
|
||||||
|
|
||||||
- name: Populate the instance config
|
- name: Populate the instance config
|
||||||
set_fact:
|
set_fact:
|
||||||
instance_conf_file: "{{ lookup('file', molecule_instance_config, errors='ignore') | from_yaml }}"
|
instance_conf: "{{ (lookup('file', molecule_instance_config) | molecule_from_yaml) if cfg.stat.exists else [] }}"
|
||||||
instance_conf: "{{ instance_conf_file | default([]) }}"
|
|
||||||
|
|
||||||
- name: Destroy molecule instance(s)
|
- name: Destroy molecule instance(s)
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -5,10 +5,14 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
no_log: "{{ molecule_no_log }}"
|
no_log: "{{ molecule_no_log }}"
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Check existing instance config file
|
||||||
|
stat:
|
||||||
|
path: "{{ molecule_instance_config }}"
|
||||||
|
register: cfg
|
||||||
|
|
||||||
- name: Populate the instance config
|
- name: Populate the instance config
|
||||||
set_fact:
|
set_fact:
|
||||||
instance_conf_file: "{{ lookup('file', molecule_instance_config, errors='ignore') | from_yaml }}"
|
instance_conf: "{{ (lookup('file', molecule_instance_config) | molecule_from_yaml) if cfg.stat.exists else [] }}"
|
||||||
instance_conf: "{{ instance_conf_file | default([]) }}"
|
|
||||||
|
|
||||||
- name: Destroy molecule instance(s)
|
- name: Destroy molecule instance(s)
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
collections:
|
collections: []
|
||||||
- name: https://gitea.rknet.org/ansible/xoxys.general/releases/download/v1.2.0/xoxys-general-1.2.0.tar.gz
|
#collections:
|
||||||
- name: community.general
|
# - name: https://gitea.rknet.org/ansible/xoxys.general/releases/download/v1.2.0/xoxys-general-1.2.0.tar.gz
|
||||||
|
# - name: community.general
|
||||||
|
Loading…
Reference in New Issue
Block a user