| 1 |
Puppet::Type.type(:libvirtd_config).provide( |
| 2 |
:ini_setting, |
| 3 |
:parent => Puppet::Type.type(:ini_setting).provider(:ruby) |
| 4 |
) do |
| 5 |
|
| 6 |
def exists? |
| 7 |
if resource[:value] == ensure_absent_val |
| 8 |
resource[:ensure] = :absent |
| 9 |
elsif resource[:quote] |
| 10 |
unless resource[:value].start_with?('"') |
| 11 |
resource[:value] = '"' + resource[:value] + '"' |
| 12 |
end |
| 13 |
end |
| 14 |
super |
| 15 |
end |
| 16 |
|
| 17 |
def section |
| 18 |
'' |
| 19 |
end |
| 20 |
|
| 21 |
def setting |
| 22 |
resource[:name] |
| 23 |
end |
| 24 |
|
| 25 |
def separator |
| 26 |
'=' |
| 27 |
end |
| 28 |
|
| 29 |
def ensure_absent_val |
| 30 |
resource[:ensure_absent_val] |
| 31 |
end |
| 32 |
|
| 33 |
def self.file_path |
| 34 |
'/etc/libvirt/libvirtd.conf' |
| 35 |
end |
| 36 |
|
| 37 |
end |