Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. 30 5 * * * /path/to/script/monitoringScript_serviceX > /path/to/script/monitoringScript_serviceX.out 2>&1
  2.  
  3. services:
  4. - service1
  5. - service2
  6.  
  7. - hosts: hostgroupX
  8. gather_facts: False
  9. tasks:
  10. - name: Ensure monitoring cron jobs are present
  11. cron:
  12. name: "check: monitoring data jobs"
  13. hour: "5"
  14. minute: "30"
  15. user: "user"
  16. job: "/path/to/script/monitoringScript_{{ item }} > /path/to/script/monitoringScript_{{ item }}.out 2>&1"
  17. loop: "{{ services }}"
  18.  
  19. #Ansible: check: monitoring data jobs
  20. 30 5 * * * /path/to/script/monitoringScript_service2 > /path/to/script/monitoringScript_service2.out 2>&1
  21.  
  22. #Ansible: check: monitoring data jobs
  23. 30 5 * * * /path/to/script/monitoringScript_service1 > /path/to/script/monitoringScript_service1.out 2>&1
  24. 30 5 * * * /path/to/script/monitoringScript_service2 > /path/to/script/monitoringScript_service2.out 2>&1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement