summaryrefslogtreecommitdiffstats
path: root/tripleo_heat_merge
diff options
context:
space:
mode:
Diffstat (limited to 'tripleo_heat_merge')
-rw-r--r--tripleo_heat_merge/merge.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tripleo_heat_merge/merge.py b/tripleo_heat_merge/merge.py
index 4571d289..127a0e03 100644
--- a/tripleo_heat_merge/merge.py
+++ b/tripleo_heat_merge/merge.py
@@ -292,7 +292,11 @@ def merge(templates, master_role=None, slave_roles=None,
errors.append('Role %s metadata key %s conflicts.' %
(role, m))
continue
- end_template['Resources'][role]['Metadata'][m] = mbody
+ role_res = end_template['Resources'][role]
+ if role_res['Type'] == 'OS::Heat::StructuredConfig':
+ end_template['Resources'][role]['Properties']['config'][m] = mbody
+ else:
+ end_template['Resources'][role]['Metadata'][m] = mbody
continue
if 'Resources' not in end_template:
end_template['Resources'] = {}
@@ -315,6 +319,8 @@ def merge(templates, master_role=None, slave_roles=None,
include_content = resolve_params(include_content,
replace_param,
replace_value)
+ if 'Resources' not in end_template:
+ end_template['Resources'] = {}
end_template['Resources'][r] = include_content
else:
if r in end_template.get('Resources', {}):