diff --git a/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml b/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml index d964d5b..e138edb 100644 --- a/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml +++ b/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml @@ -73,7 +73,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 @@ -83,5 +86,5 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" {%- endraw %} diff --git a/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml b/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml index afd44a2..63f2c4b 100644 --- a/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml +++ b/molecule_hetznercloud/cookiecutter/scenario/driver/hetznercloud/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml @@ -10,7 +10,7 @@ block: - name: Populate instance config from file set_fact: - instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}" skip_instances: false rescue: - name: Populate instance config when file missing @@ -52,7 +52,10 @@ - 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 {%- endraw %} diff --git a/molecule_hetznercloud/playbooks/create.yml b/molecule_hetznercloud/playbooks/create.yml index 7bbcfbc..fbdd6fa 100644 --- a/molecule_hetznercloud/playbooks/create.yml +++ b/molecule_hetznercloud/playbooks/create.yml @@ -74,7 +74,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 @@ -84,4 +87,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/molecule_hetznercloud/playbooks/destroy.yml b/molecule_hetznercloud/playbooks/destroy.yml index aae4ed6..2315be7 100644 --- a/molecule_hetznercloud/playbooks/destroy.yml +++ b/molecule_hetznercloud/playbooks/destroy.yml @@ -9,7 +9,7 @@ block: - name: Populate instance config from file set_fact: - instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}" skip_instances: false rescue: - name: Populate instance config when file missing @@ -51,6 +51,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_hetznercloud/test/resources/playbooks/hetznercloud/create.yml b/molecule_hetznercloud/test/resources/playbooks/hetznercloud/create.yml index bf26ee8..ea1db1c 100644 --- a/molecule_hetznercloud/test/resources/playbooks/hetznercloud/create.yml +++ b/molecule_hetznercloud/test/resources/playbooks/hetznercloud/create.yml @@ -75,7 +75,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 @@ -85,4 +88,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/molecule_hetznercloud/test/resources/playbooks/hetznercloud/destroy.yml b/molecule_hetznercloud/test/resources/playbooks/hetznercloud/destroy.yml index f49f0d7..a325423 100644 --- a/molecule_hetznercloud/test/resources/playbooks/hetznercloud/destroy.yml +++ b/molecule_hetznercloud/test/resources/playbooks/hetznercloud/destroy.yml @@ -9,7 +9,7 @@ block: - name: Populate instance config from file set_fact: - instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}" skip_instances: false rescue: - name: Populate instance config when file missing @@ -52,6 +52,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