mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-02-22 20:39:40 +01:00
Solved merge variable bug
This commit is contained in:
parent
e641539a94
commit
eaeab18103
@ -8,14 +8,23 @@
|
||||
- name: Merge domain definitions
|
||||
set_fact:
|
||||
domains: "{{ defaults_domains | combine(domains | default({}, true), recursive=True) }}"
|
||||
- name: Merge redirect domain definitions
|
||||
|
||||
- name: Merge redirect domain definitions into dictionary
|
||||
set_fact:
|
||||
redirect_domain_mappings: >-
|
||||
combined_mapping: >-
|
||||
{{
|
||||
(defaults_redirect_domain_mappings | items2dict(key_name='source', value_name='target'))
|
||||
| combine((redirect_domain_mappings | items2dict(key_name='source', value_name='target')), recursive=True)
|
||||
| dict2items
|
||||
| combine(
|
||||
(redirect_domain_mappings | items2dict(key_name='source', value_name='target')),
|
||||
recursive=True
|
||||
)
|
||||
}}
|
||||
|
||||
- name: Transform combined mapping to list with source and target keys
|
||||
set_fact:
|
||||
redirect_domain_mappings: "{{ redirect_domain_mappings | default([]) + [ {'source': item.key, 'target': item.value} ] }}"
|
||||
loop: "{{ combined_mapping | dict2items }}"
|
||||
|
||||
- name: Merge application definitions
|
||||
set_fact:
|
||||
applications: "{{ defaults_applications | combine(applications | default({}, true), recursive=True) }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user