Add stack output ansible_group_vars

This change adds a stack output to services/common.yaml that acts
as an interface for Ansible group variables.  Ansible vars provided
via this interface will be consumed by config-download and written
under $config-download-dir/group_vars/ where they can be accessed
by ansible commands.

Part of blueprint ansible-tasks-to-role.

Change-Id: Ib70e7dda13b4a3ed30af88906ba42c25cdc93038
This commit is contained in:
Jill Rouleau 2018-08-24 11:42:08 -07:00 committed by Alex Schultz
parent bd71a857c3
commit fc30066a35
1 changed files with 12 additions and 0 deletions

View File

@ -329,6 +329,17 @@ resources:
expression: coalesce($.data, []).where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
data: {get_attr: [ServiceChain, role_data]}
AnsibleGroupVars:
type: OS::Heat::Value
properties:
type: json
value:
map_merge:
yaql:
expression: list(coalesce($.data.role_data, []).where($ != null).select($.get('ansible_group_vars')).where($ != null))
data: {role_data: {get_attr: [ServiceChain, role_data]}}
outputs:
role_data:
description: Combined Role data for this set of services.
@ -357,6 +368,7 @@ outputs:
post_update_tasks: {get_attr: [PostUpdateTasks, value]}
upgrade_batch_tasks: {get_attr: [UpgradeBatchTasks, value]}
service_metadata_settings: {get_attr: [ServiceServerMetadataHook, metadata]}
ansible_group_vars: {get_attr: [AnsibleGroupVars, value]}
# Keys to support docker/services
puppet_config: {get_attr: [PuppetConfig, value]}