39 lines
1.0 KiB
YAML
Raw Normal View History

2023-02-12 21:25:57 +01:00
- name: Create sentinel directory
file:
state: directory
path: "{{ item }}/sentinel"
with_items:
- /usr/local/bin
- /etc
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
2023-02-12 22:28:32 +01:00
when: script is not defined
2023-02-13 23:52:47 +01:00
- name: Copy blacklist
copy:
src: "{{ playbook_dir }}/blacklist/{{ inventory_hostname }}/etc/sentinel/blacklist"
dest: /etc/sentinel/blacklist
mode: "0644"
when: script is not defined or script == "blacklist"
ignore_errors: true
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
tags: [ "restore" ]
2023-02-12 21:25:57 +01:00
2023-02-12 18:13:05 +01:00
- name: Deploy stats script
import_tasks: stats.yml
2023-02-12 22:28:32 +01:00
when: script is not defined or script == "stats"
2023-02-12 18:13:05 +01:00
- name: Configure blacklist script
import_tasks: blacklist.yml
2023-02-12 22:28:32 +01:00
when: script is not defined or script == "blacklist"
2023-02-12 18:13:05 +01:00
- name: Configure supervision script
import_tasks: supervision.yml
2023-02-12 22:28:32 +01:00
when: script is not defined or script == "supervision"
2023-02-13 23:52:47 +01:00