-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
Handle configuration file creation dynamically from attributes:
./templates/default/ConfigurationFile.ini:
<% @properties.each_pair do |key, value| -%>
<% if value.is_a? Array -%>
<%= key %>=<%= value.map { |item| %("#{item}") }.join(' ') %>
<% else -%>
<%= key %>="<%= value %>"
<% end -%>
<% end -%>example environment json:
{
"sql_server": {
"install": {
"properties": {
"key1": "value1",
"key2": "value2",
"array": ["item1", "item2", "item3"]
}
}
}
}end result:
key1="value1"
key2="value2"
array="item1" "item2" "item3"
This way the comments are lost, but also that can be attached if really necessary
Metadata
Metadata
Assignees
Labels
No labels