From dd83aabeb0b0514f517f3f5d7ce45c35425b9839 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 27 Sep 2022 10:27:00 +0200 Subject: [PATCH] cryptoraid --- deploy.yml | 10 ++++++++-- roles/cryptoraid/tasks/alpine.yml | 20 ++++++++++++++++++++ roles/cryptoraid/tasks/main.yml | 4 ++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 roles/cryptoraid/tasks/alpine.yml create mode 100644 roles/cryptoraid/tasks/main.yml diff --git a/deploy.yml b/deploy.yml index f4e3bc2..d8ec9ec 100644 --- a/deploy.yml +++ b/deploy.yml @@ -21,6 +21,14 @@ - gopass - woodpecker +- name: cryptoraid + hosts: + - suricata + become: true + roles: + - cryptoraid + tags: raid + - name: mounts hosts: - suricata @@ -34,7 +42,6 @@ become: true roles: - usercfg - tags: test - name: pi_fan_hwpwm hosts: @@ -81,7 +88,6 @@ - narwhal roles: - gopass - tags: gopass - name: lbu commit hosts: diff --git a/roles/cryptoraid/tasks/alpine.yml b/roles/cryptoraid/tasks/alpine.yml new file mode 100644 index 0000000..3066832 --- /dev/null +++ b/roles/cryptoraid/tasks/alpine.yml @@ -0,0 +1,20 @@ +--- +- name: install packages + apk: + name: + - gptfdisk + - sgdisk + - cryptsetup + - btrfs-progs + - zstd + +- name: load btrfs module + modprobe: + name: btrfs + state: present + +- name: btrfs module on startup + lineinfile: + path: /etc/modules + line: btrfs + insertafter: EOF diff --git a/roles/cryptoraid/tasks/main.yml b/roles/cryptoraid/tasks/main.yml new file mode 100644 index 0000000..0043a2c --- /dev/null +++ b/roles/cryptoraid/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: alpine setup + include_tasks: alpine.yml + when: ansible_distribution == "Alpine"