Macosx plist fil for å kjøyre puppet en gang i timen.

For å kjøre puppet regelmessig på macosx kan det vere greit å legge det som en launchd jobb.

Mappen “/Library/LaunchDaemons” inneheld alle demoner / demonlignende ting som skal kjøyrast uavhengig av brukar.

plist fila under kjøyrer puppet agent –test kvart 3600 sekund, altså 1 gang i timen. Den kjører også når sjølve launchd jobben vert lasta (typisk ved oppstart av maskina).

/Volumes/Macintosh\ HD/Library/LaunchDaemons/com.reductivelabs.puppet.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>EnvironmentVariables</key>
        <dict>
                <key>PATH</key>
                <string>/sbin:/usr/sbin:/bin:/usr/bin</string>
                <key>RUBYLIB</key>
                <string>/usr/lib/ruby/site_ruby/1.8/</string>
        </dict>
        <key>Label</key>
        <string>com.reductivelabs.puppet</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/bin/puppet</string>
                <string>agent</string>
                <string>--test</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StartInterval</key>
        <integer>3600</integer>
        <key>ServiceDescription</key>
        <string>Puppet Daemon</string>
</dict>
</plist>

 

Leave a Reply

Your email address will not be published. Required fields are marked *