From c57b4dc1440affe200e0f4167a11ded8440f163a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 19 Oct 2020 09:07:02 +0200 Subject: [PATCH] switch to native filters instead of molecule internals --- molecule/centos7/molecule.yml | 3 ++- molecule/centos8/create.yml | 7 +++++-- molecule/centos8/destroy.yml | 7 +++++-- molecule/centos8/molecule.yml | 3 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/molecule/centos7/molecule.yml b/molecule/centos7/molecule.yml index bbef1c7..84be741 100644 --- a/molecule/centos7/molecule.yml +++ b/molecule/centos7/molecule.yml @@ -3,7 +3,8 @@ dependency: name: galaxy options: role-file: molecule/requirements.yml - requirements-file: molecule/requirements.yml + env: + ANSIBLE_GALAXY_DISPLAY_PROGRESS: "false" driver: name: delegated platforms: diff --git a/molecule/centos8/create.yml b/molecule/centos8/create.yml index 0117c6c..54acd05 100644 --- a/molecule/centos8/create.yml +++ b/molecule/centos8/create.yml @@ -100,7 +100,10 @@ - name: Dump instance config copy: - content: "{{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}" + content: | + # Molecule managed + + {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" when: server.changed | bool @@ -110,7 +113,7 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - loop: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + loop: "{{ lookup('file', molecule_instance_config) | from_yaml }}" - name: Wait for VM to settle down pause: diff --git a/molecule/centos8/destroy.yml b/molecule/centos8/destroy.yml index ed13099..7a1ffbb 100644 --- a/molecule/centos8/destroy.yml +++ b/molecule/centos8/destroy.yml @@ -12,7 +12,7 @@ - name: Populate the instance config set_fact: - instance_conf: "{{ (lookup('file', molecule_instance_config) | molecule_from_yaml) if cfg.stat.exists else [] }}" + instance_conf: "{{ (lookup('file', molecule_instance_config) | from_yaml) if cfg.stat.exists else [] }}" - name: Destroy molecule instance(s) hcloud_server: @@ -70,6 +70,9 @@ - name: Dump instance config copy: - content: "{{ instance_conf | molecule_to_yaml | molecule_header }}" + content: | + # Molecule managed + + {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" when: server.changed | bool diff --git a/molecule/centos8/molecule.yml b/molecule/centos8/molecule.yml index 5ae9cd1..12c9ef1 100644 --- a/molecule/centos8/molecule.yml +++ b/molecule/centos8/molecule.yml @@ -3,7 +3,8 @@ dependency: name: galaxy options: role-file: molecule/requirements.yml - requirements-file: molecule/requirements.yml + env: + ANSIBLE_GALAXY_DISPLAY_PROGRESS: "false" driver: name: delegated platforms: