Hello list, I have a situation where if I have a hosts file generated by exported resources it does not trigger a service restart unlike if it was subscribing on a file that gets copied over via puppet. An example would explain it better.
it should be noted that exported resources work fine. class dnsmasq { file { "/etc/hosts": owner => "root", group => "root", mode => "644", source => "puppet:///modules/dnsmasq/hosts", } ... service { dnsmasq: ensure => running, enable => true, pattern => "dnsmasq", subscribe => File["/etc/dnsmasq.conf","/etc/dnsmasq- local.conf","/etc/hosts"], hasrestart => true, } So with the above if i change the file on the master then it will push out to all hosts that include the dnsmasq class and restart the dnsmasq service, all is good. How ever if I generate the data using exported resources nothing happens Below doesn't work class dnsmasq { Host<<| tag == "all_hosts" |>> service { dnsmasq: ensure => running, enable => true, pattern => "dnsmasq", subscribe => File["/etc/dnsmasq.conf","/etc/dnsmasq- local.conf","/etc/hosts"], hasrestart => true, } } // seperate class with /etc/hosts defined class hosts { file { "/etc/hosts": owner => "root", group => "root", mode => "644", } host { 'localhost': ip => '127.0.0.1', host_aliases => 'localhost.localdomain', } ... a few default hosts... } So my issue is that on all machines the hosts files are managed fine, however on my internal dns servers that collect all the IPs of all machines in the network whilst collecting the hosts files fine, the dnsmasq service is never restarted, meaning i need to log into each machine and manually restart dnsmasq to pick up the changes after a new host is added to the system. Any ideas? Thanks Nathan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.