Merge "Add extraconfig/role_extraconfig template to hieradata"

This commit is contained in:
Zuul 2019-08-08 12:18:47 +00:00 committed by Gerrit Code Review
commit 960e6da0dc
3 changed files with 6 additions and 2 deletions

View File

@ -42,7 +42,8 @@
# other_hierafile:
# foo: bar3
- name: Copy hieradata files for all hosts
when: not hieradata_per_host|bool
when: hieradata_template != "" and not hieradata_per_host|bool
ignore_errors: yes
include: all_hosts.yaml
vars:
hieradata_content: "{{ lookup('file', hieradata_template ~ '.rendered') | from_yaml }}"
@ -65,7 +66,8 @@
# other_hierafile:
# foo: bar
- name: Copy hieradata files per host
when: hieradata_per_host|bool
when: hieradata_template != "" and hieradata_per_host|bool
ignore_errors: yes
include: per_host.yaml host={{ inventory_hostname }} data={{ hieradata_content[inventory_hostname] }}
vars:
hieradata_content: "{{ lookup('file', hieradata_template ~ '.rendered') | from_yaml }}"

View File

@ -0,0 +1 @@
{{ extraconfig | to_nice_json }}

View File

@ -0,0 +1 @@
{{ role_extraconfig | to_nice_json }}