Hi All....
I've got this configuration to manage bind, I want the exec to be run
whenever anything under /var/named or the file /etc/named.conf gets
updated....
file { "/etc/named.conf":
owner => root,
group => root,
mode => 0644,
require => Package["bind"],
source => "puppet:///dnsauth/etc/named.conf",
}
file { "/var/named":
owner => named,
group => named,
mode => 0644,
require => File["/etc/named.root.hints"],
source => "puppet:///dnsauth/var/named",
recurse => true,
force => true,
ignore => ".svn",
purge => true,
}
exec { "/etc/init.d/named reload":
subscribe => [ File["/var/named"],
File["/etc/named.conf"] ],
command => "/etc/init.d/named reload",
refreshonly => true,
}
Currently, if I modify /etc/named.conf the exec runs as expected, but if
I modify a file under /var/named it never gets run and nothing is
logged, but the file is pushed out ok.
Any ideas how to get this to work, we'd rather not add every single
file{} entry for everything under /var/named
TIA
Craig
Hi All....
I've got this configuration to manage bind, I want the exec to be run
whenever anything under /var/named or the file /etc/named.conf gets
updated....
file { "/etc/named.conf":
owner => root,
group => root,
mode => 0644,
require => Package["bind"],
source => "puppet:///dnsauth/etc/named.conf",
}
file { "/var/named":
owner => named,
group => named,
mode => 0644,
require => File["/etc/named.root.hints"],
source => "puppet:///dnsauth/var/named",
recurse => true,
force => true,
ignore => ".svn",
purge => true,
}
Hi,
This didn't have any effect - still the same... heres the debug I get
after modifying a zone file under /var/named/zones, you'll see it pushes
the file out but never actually attempts to run the code...
# puppetd --verbose --no-daemonize --debug -o
Reopening log files
Compiled catalog for puppet in 0.17 seconds
Caching catalog at /var/lib/puppet/localconfig.yaml
Starting catalog run
(//Node[dev-mgmt]/dnsauth/File[/var/named/zones]/checksum) checksum
changed '{mtime}Wed Mar 25 14:03:37 +0000 2009' to '{mtime}Wed Mar 25
14:14:12 +0000 2009'
(Filebucket[/var/lib/puppet/clientbucket]) Adding
/var/named/zones/hosts.domain.co.uk.db(a1782f4546b5e3073361c4492b20fa0b)
(//Node[dev-mgmt]/dnsauth/File[/var/named/zones/hosts.domain.co.uk.db])
Filebucketed to puppet with sum a1782f4546b5e3073361c4492b20fa0b
(//Node[dev-mgmt]/dnsauth/File[/var/named/zones/hosts.domain.co.uk.db]/source)
replacing from source
puppet:///dnsauth/var/named/zones/hosts.domain.co.uk.db with contents
{md5}39a30e0190fa590180ff857a0a896c9c
Compiled catalog for host091.network.domain.co.uk in 0.10 seconds
(//Node[dev-mgmt]/dnsauth/File[/var/named/data]/checksum) checksum
changed '{mtime}Wed Mar 25 14:06:09 +0000 2009' to '{mtime}Wed Mar 25
14:14:14 +0000 2009'
Finished catalog run in 8.42 seconds
Cheers
Craig
This doesn't seem to work for me in THIS specific case:-editing the file directly under /var/namedAdding a new file works fine, but editing an existing one doesn't trigger the exec. I think the directory mtime doesn't change, and Puppet doesn't know that a change has happened. Thoughts?