Commit Graph

15 Commits (965cb1f825da0314e0c29aa6d51106d36f4ce408)

Author SHA1 Message Date
Brian Coca a15aa09251 removed typo 9 years ago
Brian Coca f6bbd2ac5b removed syslog in favor of common module logging functions 9 years ago
Brian Coca 81a7243bbb changed chmod to 2.4 compat 9 years ago
Brian Coca 813053c51c Merge pull request #986 from ssssam/cron-permissions-fix
Fix permissions issue with 'cron' module
9 years ago
Brian Coca 6d7428527d minor doc fixes 9 years ago
Evan Kaufman 1187399ffa Add disabled option to cron module 10 years ago
Brian Coca fed5ff04a6 Merge pull request #742 from aseigneurin/fix-remove-cron_file
Name parameter should not be marked as mandatory
10 years ago
Greg DeKoenigsberg 2a5f0bde87 Proper author info for all remaining modules 10 years ago
Toshio Kuratomi 8d2fdf2aff Update the cron docs to specify that it takes a boolean value 10 years ago
Toshio Kuratomi 4106047e77 Fix documentation of the variable that backup file name is returned in 10 years ago
Michael Scherer a4d7ebc12a Name is a required parameter, fix https://github.com/ansible/ansible/issues/10335 10 years ago
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`.
10 years ago
Alexis Seigneurin 6d6e948f1e - 'name' should not be required so as to allow uninstalling a cron_file 10 years ago
Toshio Kuratomi 799a75580a Update cron example for setting to run twice a day
Fixes #415
10 years ago
Michael DeHaan c8e1a2077e file extensions! 10 years ago