2023-10-25 22:26:17 +02:00
|
|
|
---
|
|
|
|
- name: include user tasks
|
|
|
|
ansible.builtin.include_tasks: user.yml
|
|
|
|
|
|
|
|
- name: install packages from repo
|
|
|
|
become: true
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name:
|
|
|
|
- mbuffer
|
|
|
|
- lzop
|
|
|
|
- libcapture-tiny-perl
|
|
|
|
- pv
|
2024-05-07 18:54:35 +02:00
|
|
|
- libconfig-ini-perl
|
2024-08-22 20:56:11 +02:00
|
|
|
- sanoid
|
2023-10-25 22:26:17 +02:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: create sanoid directories
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ sanoid_user }}"
|
|
|
|
group: "{{ sanoid_user_group }}"
|
|
|
|
mode: "0700"
|
|
|
|
with_items:
|
|
|
|
- "/etc/sanoid"
|
|
|
|
- "/etc/sanoid/.ssh"
|
|
|
|
|
|
|
|
- name: include snaps tasks
|
|
|
|
ansible.builtin.include_tasks: snaps.yml
|
|
|
|
when:
|
|
|
|
- sanoid_datasets is defined
|
|
|
|
- sanoid_templates is defined
|
|
|
|
- sanoid_snaps_enable is defined
|
|
|
|
- sanoid_snaps_enable
|
|
|
|
|
2023-11-28 15:13:22 +01:00
|
|
|
- name: ensure timers are enabled
|
2023-10-25 22:26:17 +02:00
|
|
|
become: true
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
state: started
|
|
|
|
name: "{{ item }}"
|
|
|
|
daemon_reload: true
|
|
|
|
masked: false
|
|
|
|
enabled: true
|
|
|
|
loop:
|
|
|
|
- sanoid.timer
|
2023-11-28 15:13:22 +01:00
|
|
|
|
|
|
|
- name: ensure services are enabled
|
|
|
|
become: true
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: "{{ item }}"
|
|
|
|
masked: false
|
|
|
|
enabled: true
|
|
|
|
loop:
|
|
|
|
- sanoid.service
|
2024-04-11 20:29:07 +02:00
|
|
|
- sanoid-prune.service
|