55 lines
1.3 KiB
YAML

- 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 }}"
- name: Template virtualhost
template:
src: virtualhost.j2
dest: /etc/sentinel/virtualhost
mode: "0444"
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
tags: [ "configure_blacklist" ]
- 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_blacklist" ]
- name: Deploy stats script
import_tasks: stats.yml
tags: [ "configure_stats" ]
- name: Configure blacklist script
import_tasks: blacklist.yml
tags: [ "configure_blacklist" ]
- name: Configure supervision script
import_tasks: supervision.yml
tags: [ "configure_supervision" ]
- name: Configure backup script
import_tasks: backup.yml
tags: [ "configure_backup" ]