diff --git a/roles/tripleo-hieradata/tasks/main.yaml b/roles/tripleo-hieradata/tasks/main.yaml index e19ff47b6..16f143ba8 100644 --- a/roles/tripleo-hieradata/tasks/main.yaml +++ b/roles/tripleo-hieradata/tasks/main.yaml @@ -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 }}" diff --git a/roles/tripleo-hieradata/templates/extraconfig.j2 b/roles/tripleo-hieradata/templates/extraconfig.j2 new file mode 100644 index 000000000..26adf545c --- /dev/null +++ b/roles/tripleo-hieradata/templates/extraconfig.j2 @@ -0,0 +1 @@ +{{ extraconfig | to_nice_json }} diff --git a/roles/tripleo-hieradata/templates/role_extraconfig.j2 b/roles/tripleo-hieradata/templates/role_extraconfig.j2 new file mode 100644 index 000000000..f0263f3a6 --- /dev/null +++ b/roles/tripleo-hieradata/templates/role_extraconfig.j2 @@ -0,0 +1 @@ +{{ role_extraconfig | to_nice_json }}