The problem I have is that I need to ensure that snmpd is stopped
before attempting to copy /var/net-snmp/snmpd.conf (snmpd credentials
file that gets corrupted if copied while snmpd is running).  Any
suggestions on how best to proceed?


# what I have so far.
class snmpd {

    package { net-snmp: ensure => installed }

    file { "/etc/snmp/snmpd.conf":
        owner   => root,
        group   => root,
        mode    => 0644,
        source  => "puppet:///snmpd/snmp.conf",
        require => Package[net-snmp],
        notify  => Service[snmpd],
    }

    file { "/var/net-snmp/snmpd.conf":
        owner   => root,
        group   => root,
        mode    => 0600,
        source  => "puppet:///snmpd/net-snmpd.conf",
        require => Package[net-snmp],
        notify  => Service[snmpd],
    }

    service { snmpd:
        enable  => true,
        hasrestart => true,
        ensure  => running,
        require => Package[$autofs_packages],
    }

Thank you.

Mark
--~--~---------~--~----~------------~-------~--~----~
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