Commit graph

26 commits

Author SHA1 Message Date
Michael Scherer
afce9e5855 Port cron to a py3 and py24 compatible syntax (#3674) 2016-05-17 10:19:19 -07:00
Tobias Wolf
0edf689688 Add diff and check mode to cron module
supports not writing backup file in check mode and new environment
vars.

![example screenshot](http://i.imgur.com/mkAThq8.png)
2016-03-14 15:42:32 +01:00
Brian Coca
8baecece22 corrected version added 2016-02-29 23:47:37 -05:00
Brian Coca
f0f8d27bff Merge pull request #2010 from lberruti/global_user_crontab_env_variables_rebase
cron module: add enviroment variables management
2016-02-29 23:39:55 -05:00
Luca Berruti
d820be81e5 Typo. 2016-02-03 16:57:06 +01:00
Brian Coca
493f06435c Merge pull request #2768 from quinot/topic/abs_cron_file
Allow cron_file to be an absolute path
2016-01-18 20:35:12 -05:00
Luca Berruti
933a44ba78 cron module: add enviroment variables management 2016-01-18 22:35:12 +01:00
Brian Coca
7a0b488244 reverse order of cron commands
does not affect linux but fixes issue with busybox caring about order
fixes #2807
2016-01-15 15:01:36 -05:00
Jeroen Seegers
1a362cdff0 Update cron.py
Minor update to documentation for the cron module to reflect the required "name" parameter when the value of "state" is "absent".
2016-01-15 17:05:34 +01:00
Thomas Quinot
0b38e4b407 Allow cron_file to be an absolute path
Support specifying an absolute path (typically /etc/crontab) rather than
a path relative to /etc/cron.d, to allow modifying the main system crontab.
Particularly useful for target systems that have /etc/crontab but no
/etc/cron.d.
2016-01-06 15:18:15 +01:00
Achilleas Pipinellis
1499288c64 Add missing documentation: cron_file requires user to be set 2015-10-08 19:20:08 +03:00
Brian Coca
a15aa09251 removed typo 2015-10-01 10:16:34 -04:00
Brian Coca
f6bbd2ac5b removed syslog in favor of common module logging functions 2015-10-01 00:13:58 -04:00
Brian Coca
81a7243bbb changed chmod to 2.4 compat 2015-09-14 09:54:38 -04:00
Brian Coca
813053c51c Merge pull request #986 from ssssam/cron-permissions-fix
Fix permissions issue with 'cron' module
2015-09-11 16:37:16 -04:00
Brian Coca
6d7428527d minor doc fixes 2015-08-12 23:55:01 -04:00
Evan Kaufman
1187399ffa Add disabled option to cron module 2015-06-28 11:29:31 -05:00
Brian Coca
fed5ff04a6 Merge pull request #742 from aseigneurin/fix-remove-cron_file
Name parameter should not be marked as mandatory
2015-06-26 19:09:45 -04:00
Greg DeKoenigsberg
2a5f0bde87 Proper author info for all remaining modules 2015-06-15 15:53:30 -04:00
Toshio Kuratomi
8d2fdf2aff Update the cron docs to specify that it takes a boolean value 2015-05-19 14:23:23 -07:00
Toshio Kuratomi
4106047e77 Fix documentation of the variable that backup file name is returned in 2015-05-19 14:15:02 -07:00
Michael Scherer
a4d7ebc12a Name is a required parameter, fix https://github.com/ansible/ansible/issues/10335 2015-04-19 12:39:36 -04:00
Sam Thursfield
adf1cba745 Fix permissions issue with 'cron' module
I have a task like this in a playbook. The ansible_ssh_user is 'root'
for this host.

    - cron:
        hour: 00
        job: /home/backup/backup.sh
        name: baserock.org data backup
        user: backup

Running it gave me the following error:

    TASK: [backup cron job, runs every day at midnight] ***************************
    failed: [baserock-backup1] => {"failed": true}
    msg: crontab: can't open '/tmp/crontabvVjoZe': Permission denied
    crontab: user backup cannot read /tmp/crontabvVjoZe

The temporary file created by the 'cron' module is created with the
Python tempfile.mkstemp() function. This creates a file that is readable
only by 'root' (mode 600). The Busybox `crontab` program then checks if
the file is readable by the 'backup' user, and fails if it isn't. So we
need to make sure the file is world-readable before running `crontab`.
2015-03-23 15:09:05 +00:00
Alexis Seigneurin
6d6e948f1e - 'name' should not be required so as to allow uninstalling a cron_file 2015-02-02 14:51:04 +01:00
Toshio Kuratomi
799a75580a Update cron example for setting to run twice a day
Fixes #415
2014-12-02 14:38:32 -08:00
Michael DeHaan
c8e1a2077e file extensions! 2014-09-26 10:37:56 -04:00
Renamed from system/cron (Browse further)