mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
171a01deac
- 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
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
-
|
|
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
|
|
|