tripleo-common/roles/tripleo-hieradata/test-playbook.yaml
James Slagle c94ee2bbfe Add template mode to tripleo-hieradata
Add a new tasks file (hieradata_vars.yaml) to the tripleo-hieradata role
that will create the hieradata files from jinja2 templates that are
included with the role.

The templates will be rendered based off of the values of
host_vars/group_vars/inventory_vars and variable files read out of Heat.

This functionality is a start to migrating the Hiera generation out of
Heat into pure Ansible.

Change-Id: I9ccccbfee44fc7c1375dec7357ccad6cba909c16
2019-06-24 18:04:26 -04:00

21 lines
545 B
YAML

- hosts: overcloud
tasks:
- name: test tripleo-hieradata
include_role:
name: tripleo-hieradata
vars:
hieradata_template: hieradata.j2.yaml
# jinja2 escape trick for simple {{ and }} strings:
variable_start_string: "{{ '{{' }}"
variable_end_string: "{{ '}}' }}"
hieradata_files:
- node
- common
- hosts: overcloud
tasks:
- name: Create hieradata from templates
include_role:
name: tripleo-hieradata
tasks_from: hieradata_vars.yaml