This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script installs the windows puppet agent on windows | |
# from the master's pe_repo by downloading it to C:\tmp first and then running | |
# msiexec on it from there. | |
$puppet_master_server = "master.example.com" | |
$msi_source = "https://${puppet_master_server}:8140/packages/current/windows-x86_64/puppet-agent-x64.msi" | |
$msi_dest = "C:\tmp\puppet-agent-x64.msi" | |
# Start the agent installation process and wait for it to end before continuing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$runinterval = 30 #minutes | |
$first_run = fqdn_rand($runinterval) | |
$second_run = $first_run + $runinterval | |
cron { 'cron.puppet': | |
command => "/opt/puppetlabs/bin/puppet agent -t > /dev/null", | |
user => "root", | |
minute => [ $first_run, $second_run ], | |
} |