fix cron setup
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
647572b08f
commit
e904342ffb
|
@ -1,11 +1,15 @@
|
|||
---
|
||||
yum_cron_enabled:
|
||||
yum_cron_enabled: True
|
||||
|
||||
yum_cron_custom_cronjob:
|
||||
enabled: False
|
||||
name: yum-cron
|
||||
minute: 0
|
||||
hour: 4
|
||||
day: "*"
|
||||
weekday: "*"
|
||||
month: "*"
|
||||
|
||||
yum_cron_custom_cronjob: False
|
||||
yum_cron_apply_updates: no
|
||||
yum_cron_download_updates: yes
|
||||
yum_cron_email_from: root@localhost
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
- name: Converge
|
||||
hosts: all
|
||||
vars:
|
||||
yum_cron_enabled:
|
||||
yum_cron_enabled: True
|
||||
yum_cron_custom_cronjob:
|
||||
enabled: True
|
||||
|
||||
roles:
|
||||
|
|
|
@ -14,7 +14,12 @@ def test_yum_cron_is_installed(host):
|
|||
assert yum.is_installed
|
||||
|
||||
|
||||
def test_yum_running_and_enabled(host):
|
||||
def test_yum_cron_running_and_enabled(host):
|
||||
yum = host.service("yum-cron")
|
||||
assert yum.is_running
|
||||
assert yum.is_enabled
|
||||
|
||||
|
||||
def test_yum_cron_custom_cronjob(host):
|
||||
custom = host.file("/etc/cron.d/x-yum")
|
||||
assert custom.exists
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
name: "{{ yum_cron_custom_cronjob.name | default('yum-cron') }}"
|
||||
minute: "{{ yum_cron_custom_cronjob.minute | default(0) }}"
|
||||
hour: "{{ yum_cron_custom_cronjob.hour | default(4) }}"
|
||||
day: "{{ yum_cron_custom_cronjob.day | default('*') }}"
|
||||
weekday: "{{ yum_cron_custom_cronjob.weekday | default('*') }}"
|
||||
month: "{{ yum_cron_custom_cronjob.month | default('*') }}"
|
||||
user: root
|
||||
cron_file: /etc/crontab
|
||||
job: "/bin/sh /etc/cron.d/x-yum"
|
||||
|
|
Loading…
Reference in New Issue