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:
Mathieu Gagné 2013-05-21 19:47:00 -04:00
parent 31522ff8fa
commit 82bb4e901b
1 changed files with 4 additions and 3 deletions

View File

@ -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