diff --git a/roles/deploy-web/tasks/blacklist.yml b/roles/deploy-web/tasks/blacklist.yml index dbaaee8..23df579 100644 --- a/roles/deploy-web/tasks/blacklist.yml +++ b/roles/deploy-web/tasks/blacklist.yml @@ -16,6 +16,7 @@ - name: Crontab blacklist ansible.builtin.cron: name: "blacklist script" + cron_file: "blacklist_cron" minute: "*/5" job: "bash /usr/local/bin/sentinel/blacklist.sh" vars: diff --git a/roles/deploy-web/tasks/deconfigure_blacklist.yml b/roles/deploy-web/tasks/deconfigure_blacklist.yml new file mode 100644 index 0000000..60014fc --- /dev/null +++ b/roles/deploy-web/tasks/deconfigure_blacklist.yml @@ -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 }}" + diff --git a/roles/deploy-web/tasks/deconfigure_stats.yml b/roles/deploy-web/tasks/deconfigure_stats.yml new file mode 100644 index 0000000..4cd0ccc --- /dev/null +++ b/roles/deploy-web/tasks/deconfigure_stats.yml @@ -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 }}" diff --git a/roles/deploy-web/tasks/deconfigure_supervision.yml b/roles/deploy-web/tasks/deconfigure_supervision.yml new file mode 100644 index 0000000..5b901b1 --- /dev/null +++ b/roles/deploy-web/tasks/deconfigure_supervision.yml @@ -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 }}" + diff --git a/roles/deploy-web/tasks/stats.yml b/roles/deploy-web/tasks/stats.yml index e743a76..d6e7a4d 100644 --- a/roles/deploy-web/tasks/stats.yml +++ b/roles/deploy-web/tasks/stats.yml @@ -36,6 +36,7 @@ - name: Crontab get info day ansible.builtin.cron: name: "get info day" + cron_file: "get_info_day_cron" minute: "0" hour: "3" job: "bash /usr/local/bin/sentinel/getinfo_day.sh" @@ -47,6 +48,7 @@ - name: Crontab get info week ansible.builtin.cron: name: "get info week" + cron_file: "get_info_week_cron" minute: "15" hour: "3" weekday: "1" @@ -58,7 +60,8 @@ - name: Crontab get info month ansible.builtin.cron: - name: "get info mongth" + name: "get info month" + cron_file: "get_info_month_cron" minute: "30" hour: "3" day: "1" diff --git a/roles/deploy-web/tasks/supervision.yml b/roles/deploy-web/tasks/supervision.yml index 8d6928b..b641ae8 100644 --- a/roles/deploy-web/tasks/supervision.yml +++ b/roles/deploy-web/tasks/supervision.yml @@ -13,6 +13,7 @@ - name: Crontab blacklist ansible.builtin.cron: name: "check ssl script" + cron_file: "check_ssl_cron" minute: "*/30" job: "bash /usr/local/bin/sentinel/check_ssl.sh" vars: