ansible/roles/netdata/tasks/auto_updates.yml
2021-01-23 18:45:20 -06:00

15 lines
652 B
YAML

---
# Since netdata 1.11 the auto-updater installs the cron by itself
# This is a legacy when Netdata didn't handle the cron itself
- name: auto_updates | Setting Up Cron Job For Auto Updates
cron:
name: Netdata Auto Updates
weekday: "{{ netdata_auto_updates['weekday'] }}"
minute: "{{ netdata_auto_updates['minute'] }}"
hour: "{{ netdata_auto_updates['hour'] }}"
user: "{{ netdata_auto_updates['user'] }}"
job: "{{ netdata_source_dir }}/{{ netdata_updater|basename }}"
cron_file: netdata_auto_updates
state: "{{ netdata_auto_updates['clean_legacy_cron']|default(false)|ternary('absent', 'present') }}"
become: true