homeserver/playbooks/on-off/remove_sanoid.yml

62 lines
1.3 KiB
YAML

---
- hosts: all
become: yes
tasks:
- name: Create Sanoid Directory
become: true
ansible.builtin.file:
path: "{{ item }}"
state: absent
owner: root
group: root
# recurse: true
with_items:
- /etc/sanoid
- name: Install Sanoid Binary
become: true
ansible.builtin.file:
dest: /usr/local/bin/sanoid
state: absent
- name: Install Sanoid Defaults Configuration
become: true
ansible.builtin.file:
dest: /etc/sanoid/sanoid.defaults.conf
state: absent
- name: Generate Sanoid Configuration
become: true
ansible.builtin.file:
dest: /etc/sanoid/sanoid.conf
state: absent
- name: Create Sanoid Log
become: true
ansible.builtin.file:
path: /var/log/sanoid-cron.log
state: absent
- name: Add Sanoid Log to be Rotated
become: true
ansible.builtin.file:
path: /etc/logrotate.d/sanoid
state: absent
- name: Generate Sanoid Cron Scripts
become: true
ansible.builtin.file:
dest: /usr/local/bin/sanoid-cron.sh
state: absent
- name: Configure Sanoid Cron Job
become: true
ansible.builtin.cron:
name: sanoid-cron
job: /usr/local/bin/sanoid-cron.sh
state: absent