enabled cron
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
# Perform remaining tasks:
|
# Perform remaining tasks:
|
||||||
- import_tasks: system_setup/clock.yml
|
- import_tasks: system_setup/clock.yml
|
||||||
# - import_tasks: system_setup/cron.yml
|
- import_tasks: system_setup/cron.yml
|
||||||
- import_tasks: system_setup/locale.yml
|
- import_tasks: system_setup/locale.yml
|
||||||
# - import_tasks: system_setup/logging.yml
|
# - import_tasks: system_setup/logging.yml
|
||||||
# - import_tasks: system_setup/memory.yml
|
# - import_tasks: system_setup/memory.yml
|
||||||
|
|||||||
@@ -84,15 +84,3 @@
|
|||||||
label: "{{ item.path }}"
|
label: "{{ item.path }}"
|
||||||
loop: "{{ files_to_change.files }}"
|
loop: "{{ files_to_change.files }}"
|
||||||
notify: restart_jitsi
|
notify: restart_jitsi
|
||||||
|
|
||||||
- name: jitsimeet | cron | schedule refresh of statistics
|
|
||||||
cron:
|
|
||||||
name: "Get statistics for Jitsi [{{ my_idx }}]"
|
|
||||||
user: root
|
|
||||||
job: "{{ item }}"
|
|
||||||
loop_control:
|
|
||||||
index_var: my_idx
|
|
||||||
loop:
|
|
||||||
- "/root/jitsi-statistics.sh"
|
|
||||||
- "sleep 20; /root/jitsi-statistics.sh"
|
|
||||||
- "sleep 40; /root/jitsi-statistics.sh"
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
# install software
|
# install software
|
||||||
- include_tasks: prepare_system.yml
|
- include_tasks: prepare_system.yml
|
||||||
- include_tasks: install_jitsimeet.yml
|
- include_tasks: install_jitsimeet.yml
|
||||||
|
- include_tasks: system_setup/cron.yml
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: task_failed=true
|
- set_fact: task_failed=true
|
||||||
|
|||||||
21
roles/jitsimeet/tasks/system_setup/cron.yml
Normal file
21
roles/jitsimeet/tasks/system_setup/cron.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
- name: jitsi | cron | schedule letsencrypt
|
||||||
|
tags: cron
|
||||||
|
cron:
|
||||||
|
name: "For Letsencrypt"
|
||||||
|
user: root
|
||||||
|
hour: 1
|
||||||
|
minute: 0
|
||||||
|
day: 1
|
||||||
|
job: "certbot renew -q"
|
||||||
|
|
||||||
|
- name: jitsimeet | cron | schedule refresh of statistics
|
||||||
|
cron:
|
||||||
|
name: "Get statistics for Jitsi [{{ my_idx }}]"
|
||||||
|
user: root
|
||||||
|
job: "{{ item }}"
|
||||||
|
loop_control:
|
||||||
|
index_var: my_idx
|
||||||
|
loop:
|
||||||
|
- "/root/jitsi-statistics.sh"
|
||||||
|
- "sleep 20; /root/jitsi-statistics.sh"
|
||||||
|
- "sleep 40; /root/jitsi-statistics.sh"
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
when: netdata is defined and netdata == true
|
when: netdata is defined and netdata == true
|
||||||
- include_tasks: utilities/snmpd.yml
|
- include_tasks: utilities/snmpd.yml
|
||||||
- include_tasks: utilities/wireguard.yml
|
- include_tasks: utilities/wireguard.yml
|
||||||
|
- include_tasks: system_setup/cron.yml
|
||||||
- include_role:
|
- include_role:
|
||||||
name: base
|
name: base
|
||||||
tasks_from: users.yml
|
tasks_from: users.yml
|
||||||
|
|||||||
11
roles/server/tasks/system_setup/cron.yml
Normal file
11
roles/server/tasks/system_setup/cron.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
- name: server | system_setup | cron
|
||||||
|
tags: cron
|
||||||
|
cron:
|
||||||
|
name: "{{ item.title }}"
|
||||||
|
user: root
|
||||||
|
hour: "{{ item.hour }}"
|
||||||
|
minute: "{{ item.minute }}"
|
||||||
|
job: "{{ item.job }}"
|
||||||
|
loop:
|
||||||
|
- { title: "Send me a list of upgradeable packages", job: "apt list --upgradable", hour: 0, minute: 0 }
|
||||||
|
- { title: "Backup", job: "/root/bin/backup_vps.bash", hour: 1, minute: 0 }
|
||||||
Reference in New Issue
Block a user