Configuration of secondary variant are not applied

Description

If you have a role with multiple variants, the configuration of all but the first variant are not accounted for in the final model.

Take this variants definition in a role tomcat-services (from the examples)

1 2 3 4 5 6 variants: - variant: services - variant: importer config: tomcat: path: /path/to/tomcat_importer

and this environment definition:

1 2 3 4 5 6 - node: services-2 roles: - role: tomcat-services variants: - services - importer

and you'll get this in the model:

1 2 3 4 variants: [services, importer] ... config: tomcat: {path: /path/to/tomcat} (the global default)

and not:

1 2 config: tomcat: {path: /path/to/tomcat_importer}

it works however if you switch the order of the variants to be [ importer , services ].
I would expect the configuration values of all variants to be merged into the final configuration in the order of the variant declaration in the environment.

Environment

None

Status

Assignee

Unassigned

Reporter

Martin Wehner

Labels

None

Components

Fix versions

Priority

Minor
Configure