Use native ansible handlers
This commit is contained in:
parent
488469e927
commit
5efff53088
@ -73,7 +73,10 @@
|
|||||||
|
|
||||||
- name: Dump instance config
|
- name: Dump instance config
|
||||||
copy:
|
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 }}"
|
dest: "{{ molecule_instance_config }}"
|
||||||
when: server.changed | bool
|
when: server.changed | bool
|
||||||
|
|
||||||
@ -83,5 +86,5 @@
|
|||||||
host: "{{ item.address }}"
|
host: "{{ item.address }}"
|
||||||
search_regex: SSH
|
search_regex: SSH
|
||||||
delay: 10
|
delay: 10
|
||||||
with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
|
with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
|
||||||
{%- endraw %}
|
{%- endraw %}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
block:
|
block:
|
||||||
- name: Populate instance config from file
|
- name: Populate instance config from file
|
||||||
set_fact:
|
set_fact:
|
||||||
instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
|
instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
|
||||||
skip_instances: false
|
skip_instances: false
|
||||||
rescue:
|
rescue:
|
||||||
- name: Populate instance config when file missing
|
- name: Populate instance config when file missing
|
||||||
@ -52,7 +52,10 @@
|
|||||||
|
|
||||||
- name: Dump instance config
|
- name: Dump instance config
|
||||||
copy:
|
copy:
|
||||||
content: "{{ instance_conf | molecule_to_yaml | molecule_header }}"
|
content: |
|
||||||
|
# Molecule managed
|
||||||
|
|
||||||
|
{{ instance_conf | to_json | from_json | to_yaml }}
|
||||||
dest: "{{ molecule_instance_config }}"
|
dest: "{{ molecule_instance_config }}"
|
||||||
when: server.changed | bool
|
when: server.changed | bool
|
||||||
{%- endraw %}
|
{%- endraw %}
|
||||||
|
@ -74,7 +74,10 @@
|
|||||||
|
|
||||||
- name: Dump instance config
|
- name: Dump instance config
|
||||||
copy:
|
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 }}"
|
dest: "{{ molecule_instance_config }}"
|
||||||
when: server.changed | bool
|
when: server.changed | bool
|
||||||
|
|
||||||
@ -84,4 +87,4 @@
|
|||||||
host: "{{ item.address }}"
|
host: "{{ item.address }}"
|
||||||
search_regex: SSH
|
search_regex: SSH
|
||||||
delay: 10
|
delay: 10
|
||||||
with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
|
with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
block:
|
block:
|
||||||
- name: Populate instance config from file
|
- name: Populate instance config from file
|
||||||
set_fact:
|
set_fact:
|
||||||
instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
|
instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
|
||||||
skip_instances: false
|
skip_instances: false
|
||||||
rescue:
|
rescue:
|
||||||
- name: Populate instance config when file missing
|
- name: Populate instance config when file missing
|
||||||
@ -51,6 +51,9 @@
|
|||||||
|
|
||||||
- name: Dump instance config
|
- name: Dump instance config
|
||||||
copy:
|
copy:
|
||||||
content: "{{ instance_conf | molecule_to_yaml | molecule_header }}"
|
content: |
|
||||||
|
# Molecule managed
|
||||||
|
|
||||||
|
{{ instance_conf | to_json | from_json | to_yaml }}
|
||||||
dest: "{{ molecule_instance_config }}"
|
dest: "{{ molecule_instance_config }}"
|
||||||
when: server.changed | bool
|
when: server.changed | bool
|
||||||
|
@ -75,7 +75,10 @@
|
|||||||
|
|
||||||
- name: Dump instance config
|
- name: Dump instance config
|
||||||
copy:
|
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 }}"
|
dest: "{{ molecule_instance_config }}"
|
||||||
when: server.changed | bool
|
when: server.changed | bool
|
||||||
|
|
||||||
@ -85,4 +88,4 @@
|
|||||||
host: "{{ item.address }}"
|
host: "{{ item.address }}"
|
||||||
search_regex: SSH
|
search_regex: SSH
|
||||||
delay: 10
|
delay: 10
|
||||||
with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
|
with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
block:
|
block:
|
||||||
- name: Populate instance config from file
|
- name: Populate instance config from file
|
||||||
set_fact:
|
set_fact:
|
||||||
instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
|
instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
|
||||||
skip_instances: false
|
skip_instances: false
|
||||||
rescue:
|
rescue:
|
||||||
- name: Populate instance config when file missing
|
- name: Populate instance config when file missing
|
||||||
@ -52,6 +52,9 @@
|
|||||||
|
|
||||||
- name: Dump instance config
|
- name: Dump instance config
|
||||||
copy:
|
copy:
|
||||||
content: "{{ instance_conf | molecule_to_yaml | molecule_header }}"
|
content: |
|
||||||
|
# Molecule managed
|
||||||
|
|
||||||
|
{{ instance_conf | to_json | from_json | to_yaml }}
|
||||||
dest: "{{ molecule_instance_config }}"
|
dest: "{{ molecule_instance_config }}"
|
||||||
when: server.changed | bool
|
when: server.changed | bool
|
||||||
|
Loading…
Reference in New Issue
Block a user