Introduce {{role.name}}ExtraGroupVars

{{role.name}}ExtraGroupVars (e.g. ControllerExtraGroupVars) is a new
interface to override any Ansible group var for a specific role.

If the group var was already defined in a service, the ExtraGroupVars
will override it.

Depends-On: https://review.opendev.org/717170
Change-Id: I3115ea3b1bd14979bad5e2ed45e91107ee969ca9
(cherry picked from commit e5cc47f9e2)
This commit is contained in:
Emilien Macchi 2020-04-02 21:45:56 -04:00
parent ec9970c268
commit fc36448fee
2 changed files with 13 additions and 0 deletions

View File

@ -272,6 +272,11 @@ parameters:
type: json
description: Optional Role Specific parameters to be provided to service
default: {}
{{role.name}}ExtraGroupVars:
type: json
description: Optional extra Ansible group vars
default: {}
{% endfor %}
# Identifiers to trigger tasks on nodes
@ -1198,6 +1203,7 @@ outputs:
neutron_physical_bridge_name: {get_param: NeutronPhysicalBridge}
neutron_public_interface_name: {get_param: NeutronPublicInterface}
network_deployment_actions: {get_attr: [{{role.name}}NetworkDeploymentActionsValue, value]}
- {get_param: {{role.name}}ExtraGroupVars}
{%- endfor %}
RoleNetHostnameMap:
description: Mapping of each network to a list of hostnames for each role

View File

@ -0,0 +1,7 @@
---
features:
- |
Introduce "{{role.name}}ExtraGroupVars" which allows to define
a dictionary of Ansible group vars per role.
These extra group vars will override any pre-defined group var from a
service.