Switch provider to manage rootwrap.conf file

... so that we users can use '<SERVICE DEFAULT>' similarly to
the resource types to manage the <service>.conf files.

Change-Id: I6fa40acff1989436c5326e94c98c9574644d18b2
This commit is contained in:
Takashi Kajinami 2022-07-09 13:29:59 +09:00
parent c3744a4b3e
commit 007f12a913
2 changed files with 7 additions and 14 deletions

View File

@ -1,21 +1,9 @@
Puppet::Type.type(:designate_rootwrap_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def file_path
def self.file_path
'/etc/designate/rootwrap.conf'
end

View File

@ -7,6 +7,11 @@ Puppet::Type.newtype(:designate_rootwrap_config) do
newvalues(/\S+\/\S+/)
end
newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|