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
|
newproperty(:value) do
|
||||||
desc 'The value of the setting to be defined.'
|
desc 'The value of the setting to be defined.'
|
||||||
munge do |v|
|
munge do |value|
|
||||||
v.to_s.strip
|
value = value.to_s.strip
|
||||||
|
value.capitalize! if value =~ /^(true|false)$/i
|
||||||
|
value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user