Allow alias value to be an array. COOK-1660
This commit is contained in:
parent
b6b927298e
commit
cc424eff02
@ -123,6 +123,9 @@ template to the `templates/default` or to the appropriate
|
|||||||
platform+version directory per the File Specificity rules for
|
platform+version directory per the File Specificity rules for
|
||||||
templates. Then specify a hash of aliases for the
|
templates. Then specify a hash of aliases for the
|
||||||
`node['postfix']['aliases']` attribute.
|
`node['postfix']['aliases']` attribute.
|
||||||
|
Arrays are supported as alias values, since postfix supports
|
||||||
|
comma separated values per alias, simply specify your alias
|
||||||
|
as an array to use this handy feature.
|
||||||
|
|
||||||
http://wiki.opscode.com/display/chef/Templates#Templates-TemplateLocationSpecificity
|
http://wiki.opscode.com/display/chef/Templates#Templates-TemplateLocationSpecificity
|
||||||
|
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
postmaster: root
|
postmaster: root
|
||||||
|
|
||||||
<% node['postfix']['aliases'].each do |name, value| %>
|
<% node['postfix']['aliases'].each do |name, value| %>
|
||||||
<%= name %>: "<%= value %>"
|
<%= name %>: <%= [value].flatten.map{|x| %Q("#{x}")}.join(', ') %>
|
||||||
<% end unless node['postfix']['aliases'].nil? %>
|
<% end unless node['postfix']['aliases'].nil? %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user