Capitalize boolean values in config files
This patch allows the usage of Puppet boolean values and still configure values with OpenStack boolean style: True/False. Change-Id: I413060bc2ec0a8d795a240cc144e503efae41e49
This commit is contained in:
parent
31522ff8fa
commit
82bb4e901b
@ -9,10 +9,11 @@ Puppet::Type.newtype(:ceilometer_config) do
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |v|
|
||||
v.to_s.strip
|
||||
munge do |value|
|
||||
value = value.to_s.strip
|
||||
value.capitalize! if value =~ /^(true|false)$/i
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user