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:
parent
c3744a4b3e
commit
007f12a913
@ -1,21 +1,9 @@
|
|||||||
Puppet::Type.type(:designate_rootwrap_config).provide(
|
Puppet::Type.type(:designate_rootwrap_config).provide(
|
||||||
:ini_setting,
|
:ini_setting,
|
||||||
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
|
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
|
||||||
) do
|
) do
|
||||||
|
|
||||||
def section
|
def self.file_path
|
||||||
resource[:name].split('/', 2).first
|
|
||||||
end
|
|
||||||
|
|
||||||
def setting
|
|
||||||
resource[:name].split('/', 2).last
|
|
||||||
end
|
|
||||||
|
|
||||||
def separator
|
|
||||||
'='
|
|
||||||
end
|
|
||||||
|
|
||||||
def file_path
|
|
||||||
'/etc/designate/rootwrap.conf'
|
'/etc/designate/rootwrap.conf'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -7,6 +7,11 @@ Puppet::Type.newtype(:designate_rootwrap_config) do
|
|||||||
newvalues(/\S+\/\S+/)
|
newvalues(/\S+\/\S+/)
|
||||||
end
|
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
|
newproperty(:value) do
|
||||||
desc 'The value of the setting to be defined.'
|
desc 'The value of the setting to be defined.'
|
||||||
munge do |value|
|
munge do |value|
|
||||||
|
Loading…
Reference in New Issue
Block a user