I don't think "ensure => running" for a service works.

puppetmaster:  2.7.19
puppet on victim machine:  2.7.19

You can see I don't have nrpe installed:

23:19:23-root@dev:~$ launchctl list | grep nrpe
23:19:24-root@dev:~$ ps -ef | grep nrpe
    0 15035  8959   0 11:19PM ttys001    0:00.00 grep nrpe
23:19:28-root@dev:~$ launchctl list | grep nrpe
23:19:30-root@dev:~$

here's my puppet config:

       file { "/Library/LaunchDaemons/homebrew.mxcl.nrpe.plist":
            group => "wheel",
            mode => 644,
            owner => "root",
            source => "puppet:///nrpe/Darwin/homebrew.mxcl.nrpe.plist",
        }

        service { "homebrew.mxcl.nrpe":
            enable => true,
            ensure => running,
        }

now I run puppet ( and running puppet agent on MacOSX while using the
launchd provider takes a really long time! )

23:19:30-root@dev:~$ /opt/bin/contact_puppet_server.sh
info: Retrieving plugin
info: Loading facts in /var/lib/puppet/lib/facter/has_compiler.rb
info: Caching catalog for dev.google.com
info: Applying configuration version '1346541729'
notice: /Stage[main]/Nrpe::Service/Service[homebrew.mxcl.nrpe]/ensure:
ensure changed 'stopped' to 'running'
notice: Finished catalog run in 150.03 seconds
23:24:44-root@dev:~$

The launchd job got loaded, but nrpe is not running:

23:25:14-root@dev:~$ ps -ef | grep nrpe
    0 15601  8959   0 11:25PM ttys001    0:00.00 grep nrpe
23:25:16-root@dev:~$ launchctl list | grep nrpe
-       0       homebrew.mxcl.nrpe
23:25:20-root@dev:~$

I can now manually start nrpe with launchd

23:25:46-root@dev:~$ launchctl start homebrew.mxcl.nrpe
23:25:52-root@dev:~$ ps -ef | grep nrpe
  502 15606     1   0 11:25PM ??         0:00.00 /usr/local/bin/nrpe -d -c
/usr/local/etc/nrpe.cfg
    0 15608  8959   0 11:25PM ttys001    0:00.00 grep nrpe

I would expect "ensure => running" would start up nrpe, and it said in the
log file it did!

Here is my launchd nrpe job plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<!-- This file should be saved as
/Library/LaunchDaemons/homebrew.mxcl.nginx.plist -->
<!-- load it with: sudo launchctl load -w
/Library/LaunchDaemons/homebrew.mxcl.nginx.plist -->
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>homebrew.mxcl.nrpe</string>

    <key>RunAtLoad</key>
    <false/>

    <key>KeepAlive</key>
    <false/>

    <key>UserName</key>
    <string>push</string>

    <key>UserGroup</key>
    <string>admin</string>

    <key>Debug</key>
    <true/>

    <key>OnDemand</key>
    <true/>

    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/nrpe</string>
        <string>-d</string>
        <string>-c</string>
        <string>/usr/local/etc/nrpe.cfg</string>
      </array>

    <key>WorkingDirectory</key>
    <string>/usr/local</string>

    <key>StandardOutPath</key>
    <string>/tmp/nrpe.out.log</string>

    <key>StandardErrorPath</key>
    <string>/tmp/nrpe.error.log</string>

  </dict>
</plist>

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

Reply via email to