37 lines
859 B
YAML
Raw Normal View History

2023-02-12 21:25:57 +01:00
# tasks file for stats script
2023-02-14 22:19:01 +01:00
- name: Create supervision directory
file:
state: directory
path: "{{ item }}/supervision"
with_items:
- /usr/local/bin
- /etc
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
2023-02-12 21:25:57 +01:00
- name: Copy check_ssl script
copy:
src: "check_ssl.sh"
2023-02-14 22:19:01 +01:00
dest: "/usr/local/bin/supervision/check_ssl.sh"
2023-02-12 21:25:57 +01:00
mode: "0555"
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
2023-02-14 22:19:01 +01:00
- name: Crontab check_ssl
2023-02-12 21:25:57 +01:00
ansible.builtin.cron:
name: "check ssl script"
2023-02-12 21:58:18 +01:00
cron_file: "check_ssl_cron"
2023-02-12 21:25:57 +01:00
minute: "*/30"
2023-02-12 22:28:32 +01:00
user: root
2023-02-14 22:19:01 +01:00
job: "bash /usr/local/bin/supervision/check_ssl.sh"
2023-02-12 21:25:57 +01:00
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"