add deconfigure tasks

This commit is contained in:
Valentin CZERYBA 2023-02-12 21:58:18 +01:00
parent c22d70bcdd
commit 1e605b0109
6 changed files with 108 additions and 1 deletions

View File

@ -16,6 +16,7 @@
- name: Crontab blacklist - name: Crontab blacklist
ansible.builtin.cron: ansible.builtin.cron:
name: "blacklist script" name: "blacklist script"
cron_file: "blacklist_cron"
minute: "*/5" minute: "*/5"
job: "bash /usr/local/bin/sentinel/blacklist.sh" job: "bash /usr/local/bin/sentinel/blacklist.sh"
vars: vars:

View File

@ -0,0 +1,25 @@
# tasks file for stats script
- name: Remove crontab blacklist
ansible.builtin.cron:
name: "blacklist script"
cron_file: "blacklist_cron"
state: absent
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
- name: Remove blacklist script
copy:
src: "{{ item }}.sh"
state: absent
with_items:
- blacklist
- refill_blacklist
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"

View File

@ -0,0 +1,55 @@
# tasks file for stats script
- name: Crontab get info day
ansible.builtin.cron:
name: "get info day"
cron_file: "get_info_day_cron"
state: absent
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
- name: Crontab get info week
ansible.builtin.cron:
name: "get info week"
cron_file: "get_info_week_cron"
state: absent
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
- name: Crontab get info month
ansible.builtin.cron:
name: "get info month"
cron_file: "get_info_month_cron"
state: absent
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
- name: Remove getinfo script
file:
path: "/usr/local/bin/sentinel/getinfo_{{ item }}.sh"
state: absent
with_items:
- day
- week
- month
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
- name: Remove template virtualhost
file:
path: /etc/sentinel/virtualhost
state: absent
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"

View File

@ -0,0 +1,22 @@
# tasks file for stats script
- name: Remove crontab blacklist
ansible.builtin.cron:
name: "check ssl script"
cron_file: "check_ssl_cron"
state: absent
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
- name: Remove check_ssl script
file:
path: "/usr/local/bin/sentinel/check_ssl.sh"
state: absent
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"

View File

@ -36,6 +36,7 @@
- name: Crontab get info day - name: Crontab get info day
ansible.builtin.cron: ansible.builtin.cron:
name: "get info day" name: "get info day"
cron_file: "get_info_day_cron"
minute: "0" minute: "0"
hour: "3" hour: "3"
job: "bash /usr/local/bin/sentinel/getinfo_day.sh" job: "bash /usr/local/bin/sentinel/getinfo_day.sh"
@ -47,6 +48,7 @@
- name: Crontab get info week - name: Crontab get info week
ansible.builtin.cron: ansible.builtin.cron:
name: "get info week" name: "get info week"
cron_file: "get_info_week_cron"
minute: "15" minute: "15"
hour: "3" hour: "3"
weekday: "1" weekday: "1"
@ -58,7 +60,8 @@
- name: Crontab get info month - name: Crontab get info month
ansible.builtin.cron: ansible.builtin.cron:
name: "get info mongth" name: "get info month"
cron_file: "get_info_month_cron"
minute: "30" minute: "30"
hour: "3" hour: "3"
day: "1" day: "1"

View File

@ -13,6 +13,7 @@
- name: Crontab blacklist - name: Crontab blacklist
ansible.builtin.cron: ansible.builtin.cron:
name: "check ssl script" name: "check ssl script"
cron_file: "check_ssl_cron"
minute: "*/30" minute: "*/30"
job: "bash /usr/local/bin/sentinel/check_ssl.sh" job: "bash /usr/local/bin/sentinel/check_ssl.sh"
vars: vars: