I know it has been discussed several time and "notify" is the "magic
word" to use here but it's not working here; my case is a bit
different. This is what I have:

***************************************************************
define line_check($fname, $line, $bool = 'false') {

    exec { "/bin/echo '${line}' >> '${fname}'":
        unless        => "/bin/grep -q '^$line' '$fname'",
        refreshonly => "$bool";
    }
}

class zmfs::config {

    zmfs::defined::line_check {'auto.master':
        fname   => '/etc/auto.master',
        line       => '/zmfs /etc/auto.zmfs',
        notify    => Class['zmfs::service'];
    }
}

class zmfs::service {
    service { 'autofs':
        enable       => true,
        ensure       => running,
        hasstatus   => true,
        hasrestart   => true,
        status         => 'service zmfs probe',
        require       => Package['zmfs','zmfs-init-scripts'];
    }
}
***************************************************************

So, I'm expecting, whenever "/etc/auto.master" is modified, autofs
service will be restarted but that's not case I see here. What am I
missing?

Another question: Can I just do "service { 'autofs':" or "service
{ 'nfs':" (or any given standard unix/linux service) just like that?
I'm wondering if that part is being completely ignored.

Cheers,
San

-- 
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.

Reply via email to