Created
September 17, 2015 20:16
-
-
Save marshyski/bbeec3a6c74a35634cbf to your computer and use it in GitHub Desktop.
Schedule a module to run in noop mode via cron
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
class run_noop ( | |
$git_dir = '/opt/my_puppet_module', | |
) { | |
# Install git puppet repo into git directory | |
vcsrepo { $git_dir: | |
ensure => latest, | |
provider => git, | |
source => 'https://github.com/user/my_puppet_module.git', | |
revision => 'master', | |
} | |
# Add my_puppet_module crontab for root | |
cron { 'my_puppet_module': | |
command => "/usr/bin/puppet apply --verbose --noop --modulepath $git_dir --noop", | |
user => root, | |
hour => '04', | |
minute => '05', | |
require => Vcsrepo["$git_dir"], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment