Merge "Use ansible group_vars for extraconfig hieradata"

This commit is contained in:
Zuul 2019-08-09 10:02:01 +00:00 committed by Gerrit Code Review
commit 1da2a86623
2 changed files with 13 additions and 17 deletions

View File

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

View File

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