2019-07-26 15:59:30 +02:00
|
|
|
---
|
|
|
|
- name: Parse cron schedule
|
|
|
|
set_fact:
|
|
|
|
minute: "{{ monitor_cron_schedule.split(' ')[0] }}"
|
|
|
|
hour: "{{ monitor_cron_schedule.split(' ')[1] }}"
|
|
|
|
day: "{{ monitor_cron_schedule.split(' ')[2] }}"
|
|
|
|
month: "{{ monitor_cron_schedule.split(' ')[3] }}"
|
|
|
|
weekday: "{{ monitor_cron_schedule.split(' ')[4] }}"
|
2020-01-10 09:55:35 -03:00
|
|
|
job: "/bin/bash -c 'cd {{ bridge_path }}/monitor/scripts; ./getBridgeStats.sh >cronWorker.out 2>cronWorker.err'"
|
2019-07-26 15:59:30 +02:00
|
|
|
- name: Add cron entry
|
|
|
|
cron:
|
|
|
|
name: "RUN_MONITOR_CHECKS"
|
|
|
|
minute: "{{ minute }}"
|
|
|
|
hour: "{{ hour }}"
|
|
|
|
day: "{{ day }}"
|
|
|
|
month: "{{ month }}"
|
|
|
|
weekday: "{{ weekday }}"
|
|
|
|
job: "{{ job }}"
|