Use ansible group_vars for extraconfig hieradata

Change-Id: I582fad2bd7b058a573c6e0398f05906582461861
Depends-On: https://review.opendev.org/#/c/673728
This commit is contained in:
Rabi Mishra 2019-07-31 00:25:51 +05:30
parent 5b2d2795a8
commit 6ff7c512c3
2 changed files with 13 additions and 17 deletions

View File

@ -113,9 +113,6 @@ parameters:
type: json
default: {}
{%- for role in roles %}
{{role.name}}DeploymentHieradata:
type: json
default: {}
{{role.name}}DeploymentHierarchy:
type: json
default: {}
@ -508,7 +505,7 @@ outputs:
include_role:
name: tripleo-hieradata
vars:
hieradata_template: "{{role.name}}/deployment-hieradata.j2.yaml"
hieradata_template: ""
hieradata_variable_start_string: $$
hieradata_variable_end_string: $$
hieradata_files: "{{ '{{' }} lookup('file', '{{role.name}}/deployment-hierarchy.yaml') {{ '}}' }}"
@ -543,6 +540,8 @@ outputs:
- cloud_domain
- fqdn
- service_configs
- extraconfig
- role_extraconfig
when: tripleo_role_name == '{{role.name}}'
tags:
- overcloud
@ -811,7 +810,6 @@ outputs:
external_deploy_steps_tasks: {get_attr: [ExternalDeployTasks, value]}
external_post_deploy_steps_tasks: {get_attr: [ExternalPostDeployTasks, value]}
{%- for role in roles %}
{{role.name}}/deployment-hieradata.j2.yaml: {get_param: {{role.name}}DeploymentHieradata}
{{role.name}}/deployment-hierarchy.yaml: {get_param: {{role.name}}DeploymentHierarchy}
{%- endfor %}
update_steps_tasks: |

View File

@ -485,20 +485,20 @@ resources:
type: json
value: {get_attr: [{{role.name}}ServiceChain, role_data]}
{{role.name}}ConfigDatafiles:
{{role.name}}ConfigData:
type: OS::Heat::Value
properties:
type: json
value:
datafiles:
{{role.name.lower()}}_extraconfig:
map_merge:
- sensu::subscriptions: {get_attr: [{{role.name}}ServiceChainRoleData, value, monitoring_subscriptions]}
service_configs: {get_attr: [{{role.name}}ServiceConfigSettings, value]}
role_extraconfig:
map_merge:
- sensu::subscriptions: {get_attr: [{{role.name}}ServiceChainRoleData, value, monitoring_subscriptions]}
{%- if role.deprecated_param_extraconfig is defined %}
- {get_param: {{role.deprecated_param_extraconfig}}}
- {get_param: {{role.deprecated_param_extraconfig}}}
{%- endif %}
- {get_param: {{role.name}}ExtraConfig}
extraconfig: {get_param: ExtraConfig}
- {get_param: {{role.name}}ExtraConfig}
extraconfig: {get_param: ExtraConfig}
{{role.name}}ServiceConfigSettings:
type: OS::Heat::Value
@ -913,7 +913,7 @@ resources:
- docker_puppet # Optionally provided by container-puppet.py
- heat_config_%{::deploy_config_name}
- config_step
- {{role.name.lower()}}_extraconfig
- role_extraconfig
- extraconfig
- service_configs
- cloud_domain
@ -946,8 +946,6 @@ resources:
{%- endfor %}
{%- for role in roles %}
{{role.name}}Count: {get_param: {{role.name}}Count}
{{role.name}}DeploymentHieradata:
{get_attr: [{{role.name}}ConfigDatafiles, value]}
{{role.name}}DeploymentHierarchy:
{get_attr: [{{role.name}}ConfigHierarchy, value]}
{%- endfor %}
@ -1063,7 +1061,7 @@ outputs:
map_merge:
list_concat:
- {get_attr: [{{role.name}}, role_group_vars]}
- [service_configs: {get_attr: [{{role.name}}ServiceConfigSettings, value]}]
- [{get_attr: [{{role.name}}ConfigData, value]}]
{%- endfor %}
RoleNetHostnameMap:
description: Mapping of each network to a list of hostnames for each role