Forked from WillPlatnick/gist:d68e83d4ed9ed0b7acc3
Last active
April 28, 2017 00:41
-
-
Save colin-nolan/651a7ddadca873f82b9132536a354c76 to your computer and use it in GitHub Desktop.
Ansible change cron.daily time
This file contains 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
# In Debian-world, cron.daily runs at a random time. This is an ansible task to | |
# change it to run at an hour specified by `cron_daily_time`. | |
- name: Change cron.daily to run at a specified time | |
become: yes | |
replace: | |
path: /etc/crontab | |
regexp: '(\S*[ \t])(\S*)([ \t].*cron\.daily)' | |
replace: '\g<1>{{ cron_daily_time }}\g<3>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment