Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

cron resource

$
0
0
Hi everyone! I'm finding myself stuck at the cron resource. Basically I've created a shell script file with file resource and added in the crontab with the cron resource. The thing is the cron executes but the shell script file no. Can someone point me in the right direction? node 'sysadmin-virtualbox'{ $str = "#!/bin/bash\ncurrentUser=\$whoami\nmyId=\$(id \$currentUser | awk '{print \$1}'| cut -f2 -d'='| cut -f1 -d'(')\necho 'You will be prompted for elevated rights'\nsudo apt-get -y install curlftpfs\ns" file{'/var/log/SYSADMIN.sh': ensure => present, content => $str, owner => sysadmin, group => sysadmin, mode => 775, } cron {'mountftp': ensure => 'present', command => "cd /var/log; ./SYSADMIN.sh", user => 'sysadmin', hour => '*', minute => '*/2', } }

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>