fix destroy playbook
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Robert Kaussow 2020-10-03 22:37:55 +02:00
parent bd53c2d502
commit a93b006a52
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
3 changed files with 16 additions and 7 deletions

View File

@ -5,10 +5,14 @@
gather_facts: false
no_log: "{{ molecule_no_log }}"
tasks:
- name: Check existing instance config file
stat:
path: "{{ molecule_instance_config }}"
register: cfg
- name: Populate the instance config
set_fact:
instance_conf_file: "{{ lookup('file', molecule_instance_config, errors='ignore') | from_yaml }}"
instance_conf: "{{ instance_conf_file | default([]) }}"
instance_conf: "{{ (lookup('file', molecule_instance_config) | molecule_from_yaml) if cfg.stat.exists else [] }}"
- name: Destroy molecule instance(s)
hcloud_server:

View File

@ -5,10 +5,14 @@
gather_facts: false
no_log: "{{ molecule_no_log }}"
tasks:
- name: Check existing instance config file
stat:
path: "{{ molecule_instance_config }}"
register: cfg
- name: Populate the instance config
set_fact:
instance_conf_file: "{{ lookup('file', molecule_instance_config, errors='ignore') | from_yaml }}"
instance_conf: "{{ instance_conf_file | default([]) }}"
instance_conf: "{{ (lookup('file', molecule_instance_config) | molecule_from_yaml) if cfg.stat.exists else [] }}"
- name: Destroy molecule instance(s)
hcloud_server:

View File

@ -1,4 +1,5 @@
---
collections:
- name: https://gitea.rknet.org/ansible/xoxys.general/releases/download/v1.2.0/xoxys-general-1.2.0.tar.gz
- name: community.general
collections: []
#collections:
# - name: https://gitea.rknet.org/ansible/xoxys.general/releases/download/v1.2.0/xoxys-general-1.2.0.tar.gz
# - name: community.general