
... so that this module supports configuration of all libvirt daemons. Change-Id: I93a02935df3a23e15b4a37081dc2a6ea646f6c79
38 lines
617 B
Ruby
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
|