From a5cd7d1f47d5de65682fbfc3ae0ebbbb4835853f Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Fri, 13 Jan 2023 14:26:30 -0800 Subject: setup zfs --- clarkzjw.ca/config/atlas/README.md | 13 +++++++++++++ clarkzjw.ca/config/atlas/init.yaml | 2 ++ clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml | 8 +++++++- clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml | 6 ++++++ clarkzjw.ca/config/atlas/setup.yaml | 2 +- 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/clarkzjw.ca/config/atlas/README.md b/clarkzjw.ca/config/atlas/README.md index 228236a..7eb8ffb 100644 --- a/clarkzjw.ca/config/atlas/README.md +++ b/clarkzjw.ca/config/atlas/README.md @@ -2,3 +2,16 @@ Hostname: atlas Usage: HomeLab Main NAS + +## Step + +### Init + +```bash +ansible-playbook init.yaml -K -k +``` + +### Setup +```bash +ansible-playbook setup.yaml +``` diff --git a/clarkzjw.ca/config/atlas/init.yaml b/clarkzjw.ca/config/atlas/init.yaml index 3226121..9415d6f 100644 --- a/clarkzjw.ca/config/atlas/init.yaml +++ b/clarkzjw.ca/config/atlas/init.yaml @@ -3,6 +3,8 @@ hosts: storinator remote_user: root gather_facts: true + vars: + ansible_ssh_common_args: "-J pve" roles: - role: init diff --git a/clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml b/clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml index 845af8d..4cfc23d 100644 --- a/clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml +++ b/clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml @@ -39,12 +39,18 @@ - name: Install ZFS apt: name: - - linux-headers-amd64 + - linux-headers-{{ ansible_kernel }} - zfsutils-linux + - zfs-dkms update_cache: true fail_on_autoremove: yes default_release: "{{ ansible_distribution_release | lower }}-backports" +- name: Load zfs kernel module + modprobe: + name: zfs + state: present + - name: Clean unneeded packages apt: autoremove: true diff --git a/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml index eb3f03b..cc69403 100644 --- a/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml +++ b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml @@ -16,3 +16,9 @@ name: clarkzjw groups: wheel append: yes + +- name: Set authorized keys taken from url + authorized_key: + user: clarkzjw + state: present + key: https://github.com/clarkzjw.keys diff --git a/clarkzjw.ca/config/atlas/setup.yaml b/clarkzjw.ca/config/atlas/setup.yaml index 34622c8..444e331 100644 --- a/clarkzjw.ca/config/atlas/setup.yaml +++ b/clarkzjw.ca/config/atlas/setup.yaml @@ -5,4 +5,4 @@ roles: - role: debian_init - - role: samba +# - role: samba -- cgit v1.2.3