diff --git a/lib/puppet/type/glance_api_config.rb b/lib/puppet/type/glance_api_config.rb index 97e171cf..d7bd10f9 100644 --- a/lib/puppet/type/glance_api_config.rb +++ b/lib/puppet/type/glance_api_config.rb @@ -9,10 +9,11 @@ Puppet::Type.newtype(:glance_api_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 diff --git a/lib/puppet/type/glance_api_paste_ini.rb b/lib/puppet/type/glance_api_paste_ini.rb index 8e3eb4e0..740f2bbc 100644 --- a/lib/puppet/type/glance_api_paste_ini.rb +++ b/lib/puppet/type/glance_api_paste_ini.rb @@ -9,10 +9,11 @@ Puppet::Type.newtype(:glance_api_paste_ini) 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 diff --git a/lib/puppet/type/glance_cache_config.rb b/lib/puppet/type/glance_cache_config.rb index d35d68d7..ae0254e1 100644 --- a/lib/puppet/type/glance_cache_config.rb +++ b/lib/puppet/type/glance_cache_config.rb @@ -9,10 +9,11 @@ Puppet::Type.newtype(:glance_cache_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 diff --git a/lib/puppet/type/glance_registry_config.rb b/lib/puppet/type/glance_registry_config.rb index f51213b8..3b08e6a6 100644 --- a/lib/puppet/type/glance_registry_config.rb +++ b/lib/puppet/type/glance_registry_config.rb @@ -9,10 +9,11 @@ Puppet::Type.newtype(:glance_registry_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 diff --git a/lib/puppet/type/glance_registry_paste_ini.rb b/lib/puppet/type/glance_registry_paste_ini.rb index 8b96a655..8c9b956b 100644 --- a/lib/puppet/type/glance_registry_paste_ini.rb +++ b/lib/puppet/type/glance_registry_paste_ini.rb @@ -9,10 +9,11 @@ Puppet::Type.newtype(:glance_registry_paste_ini) 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