Add extraconfig/role_extraconfig template to hieradata

Change-Id: I8f173d125e7407a80c9ddb89e5272fe2a829b1cb
This commit is contained in:
Rabi Mishra 2019-07-31 06:43:46 +05:30
parent e3fca9e164
commit 9a25d23d09
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 }}