66 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2023-02-12 18:38:38 +01:00
# tasks file for stats script
2023-02-12 22:28:32 +01:00
- name: Template token ipinfo
2023-02-12 19:15:48 +01:00
template:
2023-02-12 22:28:32 +01:00
src: token.j2
dest: /etc/sentinel/token
2023-02-12 21:25:57 +01:00
mode: "0555"
2023-02-12 18:38:38 +01:00
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
2023-02-12 22:28:32 +01:00
- name: Copy getinfo script
2023-02-12 18:38:38 +01:00
copy:
2023-02-12 22:28:32 +01:00
src: "getinfo_{{ item }}.sh"
2023-02-12 19:15:48 +01:00
dest: "/usr/local/bin/sentinel/getinfo_{{ item }}.sh"
2023-02-12 21:25:57 +01:00
mode: "0555"
2023-02-12 19:15:48 +01:00
with_items:
2023-02-12 22:28:32 +01:00
- day
2023-02-12 19:15:48 +01:00
- week
- month
2023-02-12 18:38:38 +01:00
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
2023-02-12 19:15:48 +01:00
- name: Crontab get info day
ansible.builtin.cron:
name: "get info day"
2023-02-12 21:58:18 +01:00
cron_file: "get_info_day_cron"
2023-02-12 19:15:48 +01:00
minute: "0"
hour: "3"
2023-02-12 22:28:32 +01:00
user: root
2023-02-12 19:15:48 +01:00
job: "bash /usr/local/bin/sentinel/getinfo_day.sh"
2023-02-12 18:38:38 +01:00
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
2023-02-12 19:15:48 +01:00
- name: Crontab get info week
ansible.builtin.cron:
name: "get info week"
2023-02-12 21:58:18 +01:00
cron_file: "get_info_week_cron"
2023-02-12 19:15:48 +01:00
minute: "15"
hour: "3"
weekday: "1"
2023-02-12 22:28:32 +01:00
user: root
2023-02-12 19:15:48 +01:00
job: "bash /usr/local/bin/sentinel/getinfo_week.sh"
2023-02-12 18:38:38 +01:00
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
2023-02-12 19:15:48 +01:00
- name: Crontab get info month
ansible.builtin.cron:
2023-02-12 21:58:18 +01:00
name: "get info month"
cron_file: "get_info_month_cron"
2023-02-12 19:15:48 +01:00
minute: "30"
hour: "3"
day: "1"
2023-02-12 22:28:32 +01:00
user: root
2023-02-12 19:15:48 +01:00
job: "bash /usr/local/bin/sentinel/getinfo_month.sh"
2023-02-12 18:38:38 +01:00
vars:
ansible_become: yes
ansible_become_method: sudo
2023-02-12 21:25:57 +01:00
ansible_become_password: "{{ sudo_password }}"