diff --git a/lib/puppet/provider/heat_api_cfn_config/ini_setting.rb b/lib/puppet/provider/heat_api_cfn_config/ini_setting.rb new file mode 100644 index 00000000..ca4261b3 --- /dev/null +++ b/lib/puppet/provider/heat_api_cfn_config/ini_setting.rb @@ -0,0 +1,22 @@ +Puppet::Type.type(:heat_api_cfn_config).provide( + :ini_setting, + :parent => Puppet::Type.type(:ini_setting).provider(:ruby) +) do + + def section + resource[:name].split('/', 2).first + end + + def setting + resource[:name].split('/', 2).last + end + + def separator + '=' + end + + def file_path + '/etc/heat/heat-api-cfn.conf' + end + +end diff --git a/lib/puppet/provider/heat_api_cloudwatch_config/ini_setting.rb b/lib/puppet/provider/heat_api_cloudwatch_config/ini_setting.rb new file mode 100644 index 00000000..507663e4 --- /dev/null +++ b/lib/puppet/provider/heat_api_cloudwatch_config/ini_setting.rb @@ -0,0 +1,22 @@ +Puppet::Type.type(:heat_api_cloudwatch_config).provide( + :ini_setting, + :parent => Puppet::Type.type(:ini_setting).provider(:ruby) +) do + + def section + resource[:name].split('/', 2).first + end + + def setting + resource[:name].split('/', 2).last + end + + def separator + '=' + end + + def file_path + '/etc/heat/heat-api-cloudwatch.conf' + end + +end diff --git a/lib/puppet/provider/heat_api_config/ini_setting.rb b/lib/puppet/provider/heat_api_config/ini_setting.rb new file mode 100644 index 00000000..dadc0565 --- /dev/null +++ b/lib/puppet/provider/heat_api_config/ini_setting.rb @@ -0,0 +1,22 @@ +Puppet::Type.type(:heat_api_config).provide( + :ini_setting, + :parent => Puppet::Type.type(:ini_setting).provider(:ruby) +) do + + def section + resource[:name].split('/', 2).first + end + + def setting + resource[:name].split('/', 2).last + end + + def separator + '=' + end + + def file_path + '/etc/heat/heat-api.conf' + end + +end diff --git a/lib/puppet/provider/heat_engine_config/ini_setting.rb b/lib/puppet/provider/heat_engine_config/ini_setting.rb new file mode 100644 index 00000000..72e68345 --- /dev/null +++ b/lib/puppet/provider/heat_engine_config/ini_setting.rb @@ -0,0 +1,22 @@ +Puppet::Type.type(:heat_engine_config).provide( + :ini_setting, + :parent => Puppet::Type.type(:ini_setting).provider(:ruby) +) do + + def section + resource[:name].split('/', 2).first + end + + def setting + resource[:name].split('/', 2).last + end + + def separator + '=' + end + + def file_path + '/etc/heat/heat-engine.conf' + end + +end diff --git a/lib/puppet/type/heat_api_cfn_config.rb b/lib/puppet/type/heat_api_cfn_config.rb new file mode 100644 index 00000000..98230b9c --- /dev/null +++ b/lib/puppet/type/heat_api_cfn_config.rb @@ -0,0 +1,19 @@ +Puppet::Type.newtype(:heat_api_cfn_config) do + + ensurable + + newparam(:name, :namevar => true) do + desc 'Section/setting name to manage from heat_api_cfn.conf' + newvalues(/\S+\/\S+/) + end + + newproperty(:value) do + desc 'The value of the setting to be defined.' + 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/heat_api_cloudwatch_config.rb b/lib/puppet/type/heat_api_cloudwatch_config.rb new file mode 100644 index 00000000..90b27499 --- /dev/null +++ b/lib/puppet/type/heat_api_cloudwatch_config.rb @@ -0,0 +1,19 @@ +Puppet::Type.newtype(:heat_api_cloudwatch_config) do + + ensurable + + newparam(:name, :namevar => true) do + desc 'Section/setting name to manage from heat-api-cloudwatch.conf' + newvalues(/\S+\/\S+/) + end + + newproperty(:value) do + desc 'The value of the setting to be defined.' + 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/heat_api_config.rb b/lib/puppet/type/heat_api_config.rb new file mode 100644 index 00000000..c9433295 --- /dev/null +++ b/lib/puppet/type/heat_api_config.rb @@ -0,0 +1,19 @@ +Puppet::Type.newtype(:heat_api_config) do + + ensurable + + newparam(:name, :namevar => true) do + desc 'Section/setting name to manage from heat-api.conf' + newvalues(/\S+\/\S+/) + end + + newproperty(:value) do + desc 'The value of the setting to be defined.' + 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/heat_engine_config.rb b/lib/puppet/type/heat_engine_config.rb new file mode 100644 index 00000000..2e7deaa8 --- /dev/null +++ b/lib/puppet/type/heat_engine_config.rb @@ -0,0 +1,19 @@ +Puppet::Type.newtype(:heat_engine_config) do + + ensurable + + newparam(:name, :namevar => true) do + desc 'Section/setting name to manage from heat-engine.conf' + newvalues(/\S+\/\S+/) + end + + newproperty(:value) do + desc 'The value of the setting to be defined.' + munge do |value| + value = value.to_s.strip + value.capitalize! if value =~ /^(true|false)$/i + value + end + end + +end