49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
---
|
|
- name: include user tasks
|
|
include_tasks: user.yml
|
|
|
|
- name: install packages from repo
|
|
become: true
|
|
ansible.builtin.apt:
|
|
name:
|
|
- mbuffer
|
|
- lzop
|
|
state: present
|
|
|
|
- name: install packages from self-build
|
|
become: true
|
|
ansible.builtin.apt:
|
|
deb: "{{ sanoid_deb_url }}"
|
|
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
|
|
include_tasks: snaps.yml
|
|
when:
|
|
- sanoid_datasets is defined
|
|
- sanoid_templates is defined
|
|
- sanoid_snaps_enable is defined
|
|
- sanoid_snaps_enable
|
|
|
|
- name: include source-host tasks
|
|
include_tasks: source.yml
|
|
when:
|
|
- sanoid_syncoid_source_host is defined and sanoid_syncoid_source_host is true
|
|
- sanoid_syncoid_ssh_pubkey is defined
|
|
|
|
- name: include destination-host tasks
|
|
include_tasks: destination.yml
|
|
when:
|
|
- sanoid_syncoid_destination_host is defined and sanoid_syncoid_destination_host is true
|
|
- sanoid_syncoid_ssh_privkey is defined
|