1 Puppet::Type.newtype(:ini_subsetting) do
8 newparam(:name, :namevar => true) do
9 desc 'An arbitrary name used as the identity of the resource.'
13 desc 'The name of the section in the ini file in which the setting should be defined.' +
14 'If not provided, defaults to global, top of file, sections.'
19 desc 'The name of the setting to be defined.'
22 newparam(:subsetting) do
23 desc 'The name of the subsetting to be defined.'
26 newparam(:subsetting_separator) do
27 desc 'The separator string between subsettings. Defaults to " "'
32 desc 'The ini file Puppet will ensure contains the specified setting.'
34 unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/))
35 raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'")
40 newparam(:key_val_separator) do
41 desc 'The separator string to use between each setting name and value. ' +
42 'Defaults to " = ", but you could use this to override e.g. ": ", or' +
43 'whether or not the separator should include whitespace.'
47 newparam(:quote_char) do
48 desc 'The character used to quote the entire value of the setting. ' +
49 %q{Valid values are '', '"' and "'". Defaults to ''.}
53 unless value =~ /^["']?$/
54 raise Puppet::Error, %q{:quote_char valid values are '', '"' and "'"}
59 newproperty(:value) do
60 desc 'The value of the subsetting to be defined.'