puppet-neutron/lib/puppet/provider/neutron_metadata_agent_config/ini_setting.rb
Nathan A. Taylor 39698c4d62 Set ini/openstack libs to pass file_path properly
Currently the file_path sections, of the ini_setting.rb's and
openstackconfig.rb's, are not being passed in the best way. When trying
to use ini_settings it throws an error stating "ini_settings only
support collecting instances when a file path is hard coded". Passing
the variables with the 'self.' alleviates this.

This is needed in order to be able to use the purge_config option.

  *Added backwards compatability for older versions of inifile
Change-Id: I9b09bf574208af5c044508129e41ec7420ac1f82
2016-04-06 15:44:32 -06:00

16 lines
341 B
Ruby

Puppet::Type.type(:neutron_metadata_agent_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def self.file_path
'/etc/neutron/metadata_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end