Hi,
Please help me in following:
I'm trying to check ntp.conf files some of which have and some have
not lines like these
server ntp1.example.com
server ntp2.example.com
server ntp3.example.com
How I should form onlyif condition with match to make it working:
now I have either it is not working at all or just accumulating
additional lines.
May be I have to separate this to 3 sets each per server? From other
side using some regexp like ntp[123] could make it shorter and more
readable.
Sorry for my puppet/augeas stile:
class ntpd{
service { ntpd:
name => "ntpd",
enable => true,
ensure => running,
require => File["/etc/ntp.conf"],
}
file { "/etc/ntp.conf" :
owner => "root",
group => "root",
mode => 664,
require => [Package["ntp"], Augeas["/etc/ntp.conf"]]
}
package { ntp: ensure => present }
augeas{"/etc/ntp.conf":
context => "/files/etc/ntp.conf",
changes => [
"set server[last()+1] ntp1.example.com",
"set server[last()+1] ntp2.example.com",
"set server[last()+1] ntp3.example.com",
],
onlyif => "match server[last()] != 'ntp3.logitech.com'",
# onlyif => "match server != ['ntp1.logitech.com',
'ntp2.logitech.com', 'ntp3.logitech.com']"
}
}
Also is any way to check what is happening on REMOTE side at time of
puppet/augeas execution? Any remote debug and some file reference to
accept this debug log?
Please advise,
Alex
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.