diff options
author | Mike Grozak <mike.grozak@gmail.com> | 2013-02-08 09:02:44 +0100 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2013-02-09 17:11:19 +0100 |
commit | 171a01deacd4cdc125252aa21291fbf6ded0ae0d (patch) | |
tree | c42000b130cc12f277f65a1550ebe67fb09c8de5 /test | |
parent | Merge pull request #2033 from lorin/intersect-pattern (diff) | |
download | ansible-171a01deacd4cdc125252aa21291fbf6ded0ae0d.tar.xz ansible-171a01deacd4cdc125252aa21291fbf6ded0ae0d.zip |
Cron module upgrades
- added cron_file attribute: if specified, the file with appropriate
job is created in /etc/cron.d directory. Also, you can store multiple
jobs in one file. state='absent' attribute is handled in the following
way in this case: if after the deletion of the job from the file specified
by cron_file variable the file is empty, the file is deleted, otherwise
not.
- fixed the behaviour, when the backupfile is saved forever in /tmp
folder, even if the backup= atribute is not set (os.unlink() is called if
backup is not True).
- added some comments to the unobvious places
Diffstat (limited to 'test')
-rw-r--r-- | test/cron_test.yml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/cron_test.yml b/test/cron_test.yml new file mode 100644 index 0000000000..e192537be3 --- /dev/null +++ b/test/cron_test.yml @@ -0,0 +1,42 @@ +- + hosts: all + gather_facts: no + user: root + vars: + color: brown + tasks: + - name: test 1 + cron: name="execution test 1" weekday="2,3" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" cron_file=yum-autoupdate state=absent + tags: + - cron + + - name: test 1-1 + cron: name="execution test 1" weekday="2,3" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" cron_file=yum-autoupdate state=absent + tags: + - cron + + - name: test 2-1 + cron: name="execution test 2" weekday="2,3" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" state=absent + tags: + - cron + + - name: test 2-2 + cron: name="execution test 2" weekday="2,3" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" state=absent + tags: + - cron + + - name: test 2-3 + cron: name="execution test 2" weekday="2,3" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" + tags: + - cron + + - name: test 3-1 + cron: name="execution test 3" weekday="2,3" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" cron_file=yum-autoupdate state=absent + tags: + - cron + + - name: test 3-2 + cron: name="execution test 3" weekday="2,3" minute=0 hour=12 user="root" job="YUMINTERACTIVE=0 /usr/sbin/yum-autoupdate" cron_file=yum-autoupdate + tags: + - cron + |