Files
puppet-nova/lib/puppet/provider/virtlockd_config/ini_setting.rb
Takashi Kajinami 5242d3a08b Support virtlockd configurations
... so that this module supports configuration of all libvirt daemons.

Change-Id: I93a02935df3a23e15b4a37081dc2a6ea646f6c79
2022-04-19 09:13:48 +09:00

38 lines
617 B
Ruby

Puppet::Type.type(:virtlockd_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def exists?
if resource[:value] == ensure_absent_val
resource[:ensure] = :absent
elsif resource[:quote]
unless resource[:value].start_with?('"')
resource[:value] = '"' + resource[:value] + '"'
end
end
super
end
def section
''
end
def setting
resource[:name]
end
def separator
'='
end
def ensure_absent_val
resource[:ensure_absent_val]
end
def self.file_path
'/etc/libvirt/virtlockd.conf'
end
end