listupgrade: crontab is configurable

This commit is contained in:
Jérémy Lecour 2021-07-02 14:01:46 +02:00 committed by Jérémy Lecour
parent b0b24744d6
commit 90cbd17f9b
3 changed files with 19 additions and 9 deletions

View File

@ -13,6 +13,7 @@ The **patch** part changes incrementally at each release.
### Added
* certbot: add script for manual deploy hooks execution
* listupgrade: crontab is configurable
### Changed

View File

@ -2,4 +2,10 @@
general_alert_email: "root@localhost"
listupgrade_alert_email: Null
listupgrade_cron_enabled: true
listupgrade_cron_enabled: true
listupgrade_cron_minute: "42"
listupgrade_cron_hour: "9"
listupgrade_cron_day: "*"
listupgrade_cron_month: "*"
listupgrade_cron_weekday: "2"
listupgrade_cron_force: false

View File

@ -46,14 +46,17 @@
group: root
- name: Enable listupgrade cron
copy:
src: listupgrade_cron
dest: /etc/cron.d/listupgrade
mode: "0600"
owner: root
group: root
force: no
when: listupgrade_cron_enabled | bool
cron:
name: "lisupgrade.sh"
cron_file: "listupgrade"
user: root
job: "/usr/share/scripts/listupgrade.sh --cron {{ listupgrade_cron_force | bool | ternary('--force','') }}"
minute: "{{ listupgrade_cron_minute }}"
hour: "{{ listupgrade_cron_hour }}"
weekday: "{{ listupgrade_cron_weekday }}"
day: "{{ listupgrade_cron_day }}"
month: "{{ listupgrade_cron_month }}"
state: "{{ listupgrade_cron_enabled | bool | ternary('present','absent') }}"
- name: old-kernel-autoremoval script is present
copy: