7cbd4bbf8c
In order for the ini file type to support purging, the file path must be accessible on the class instance. This patch was made to test some new functionality being added to the inifile type https://github.com/cprice-puppet/puppetlabs-inifile/pull/25 It does effect backwards compat of this native type so its ok to go ahead and merge.
28 lines
483 B
Ruby
28 lines
483 B
Ruby
Puppet::Type.type(:glance_registry_paste_ini).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 self.file_path
|
|
'/etc/glance/glance-registry-paste.ini'
|
|
end
|
|
|
|
# added for backwards compatibility with older versions of inifile
|
|
def file_path
|
|
self.class.file_path
|
|
end
|
|
|
|
end
|