Sorry, I am just not getting this, why does merge_named work but not merge_list
I could be wrong but the website direction imply that list should work. what am I missing. please do explain it like I’m a complete newbie.
What is the ‘right’ way to do this? I still want to add some templates into this to display cost based on usage.
Read this over carefully, and it it doesn’t answer the question come back for clarification:
And this video Frenck shows examples:
tom_l
3
This is a list:
a_yaml_key:
- a_list_item: foo
- a_list_item: bar
Use merge list for these types.
e.g.
a_yaml_key: !include_dir_list folder_1/my_listed_stuff/
This is a dictionary (note the absence of dashes):
a_yaml_key:
a_dictionary_entry: foo
another_dictionary_entry: bar
Use merge named for these types.
e.g.
a_yaml_key: !include_dir_named folder_1/my_named_stuff/
WallyR
(Wally)
4
A better example of a list would be…
a_yaml_key:
- a_list_item: foo
- a_list_item: bar
A list is referenced using the number of the element in the list, where a named (dict) is referenced by using the name.
1 Like