summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-05-11 03:47:35 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-05-25 00:04:27 +0200
commit22625ac4e802a2317d0ad723a8d7f292ecf10fbe (patch)
tree2df599e52dac83ab187bfc8bedabd1077ec47e6b
parentremove nextcloud test instance (diff)
add host sk-tomnext
-rw-r--r--dan/host_vars/sk-tomnext.yml21
-rw-r--r--dan/sk-tomnext.yml13
-rw-r--r--inventory/host_vars/sk-tomnext.yml55
-rw-r--r--inventory/hosts.ini3
-rw-r--r--roles/zfs/base/tasks/Debian.yml23
5 files changed, 113 insertions, 2 deletions
diff --git a/dan/host_vars/sk-tomnext.yml b/dan/host_vars/sk-tomnext.yml
new file mode 100644
index 00000000..cc9eda31
--- /dev/null
+++ b/dan/host_vars/sk-tomnext.yml
@@ -0,0 +1,21 @@
+$ANSIBLE_VAULT;1.2;AES256;dan
+64623637363864333635663161656561306662333266613733373033383336326364623534363039
+6231636266303035623261613365613364353532316233390a646463373462363339313239313961
+31363961646463373761346664333937646265333433623132383236643033613666656562303932
+3564313234396433620a633739653966336139333239636363383139383066616662666336616566
+64666365373530633363633238313163333634643339356261373364396263376662386239303037
+34613233323532623130316538623339323833346236393432646238656265666363363635336331
+61626536633837646361313865313735653135313533386534303664393562333461393133616534
+64356432303863663236326232326365323165383761663233396664653964376363626630616663
+61356331626465396430656432613731623032396438303736623663383363643762313431343337
+30363039306264356536346464666262663733393966313132653161376334353763623664396134
+36323135656133393664616535646338323033363666386464336566643836306433633665336332
+38363032363237356336343064666363323638346262623834323530623734343033336632393431
+64646462383364346430326338313730626533346437333135656262333036376133636533353365
+38613133633034653165343437373637353366323438383862383065353363646337643435383334
+35346431353765303866383532386263353930383466323439386466633438643535663935373834
+37653430663331313935633066633862316337666430373164643133316139633133663934303232
+34633836373931373363316334373634363430653436366433393235336566346532663739353033
+31623432323731393966613838366564613661336433386463306538343834656463653831656462
+39383031343038373734313064316638623361343339623130326333303166346263353230323437
+37353666633036386130
diff --git a/dan/sk-tomnext.yml b/dan/sk-tomnext.yml
new file mode 100644
index 00000000..54c31bfd
--- /dev/null
+++ b/dan/sk-tomnext.yml
@@ -0,0 +1,13 @@
+---
+- name: Basic Setup
+ hosts: sk-tomnext
+ roles:
+ - role: base
+ - role: sshd
+ - role: zsh
+ - role: admin-user
+ - role: apt-repo/base
+ - role: cryptdisk
+ - role: zfs/base
+ - role: vm/host
+ - role: installer/debian/base
diff --git a/inventory/host_vars/sk-tomnext.yml b/inventory/host_vars/sk-tomnext.yml
new file mode 100644
index 00000000..725fbbb6
--- /dev/null
+++ b/inventory/host_vars/sk-tomnext.yml
@@ -0,0 +1,55 @@
+---
+install:
+ cloud:
+ credentials: "{{ vault_hroot_robot_account }}"
+ server_name: "{{ host_name }}"
+ disks:
+ layout: nvme_raid
+ root_lvm_size: 10G
+
+network: {}
+
+base_intel_nic_stability_fix: true
+
+vm_host:
+ network:
+ dns:
+ - 213.133.100.100
+ - 213.133.98.98
+ - 213.133.99.99
+ bridges:
+ public:
+ prefix: 192.168.250.254/24
+ offsets:
+ sk-tomnext-nc: 103
+ sk-tomnext-hp: 104
+ nat: yes
+ overlay:
+ prefix: 94.130.206.64/26
+ offsets:
+ sk-tomnext-nc: 39
+ sk-tomnext-hp: 40
+
+ssh_keys_root: "{{ ssh_keys.equinox[env_group] + ssh_keys.dan }}"
+
+apt_repo_components:
+ - main
+ - contrib
+
+cryptdisk_volumes:
+ crypto-nvme0:
+ passphrase: "{{ vault_cryptdisk_volumes['crypto-nvme0'].passphrase }}"
+ device: /dev/disk/by-id/nvme-eui.00000000000000018ce38e0500157a42-part3
+ crypto-nvme1:
+ passphrase: "{{ vault_cryptdisk_volumes['crypto-nvme1'].passphrase }}"
+ device: /dev/disk/by-id/nvme-eui.00000000000000018ce38e0500157b3d-part3
+
+
+zfs_zpools:
+ storage:
+ mountpoint: /srv/storage
+ create_vdevs: mirror /dev/mapper/crypto-nvme0 /dev/mapper/crypto-nvme1
+
+zfs_arc_size:
+ min: "{{ 2 * 1024 * 1024 * 1024 }}"
+ max: "{{ 8 * 1024 * 1024 * 1024 }}"
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index 89d073a8..6f7d7a72 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -128,6 +128,7 @@ env_group=dan
sk-2019 host_name=2019
sk-cloudia host_name=cloudia
sk-2019vm host_name=2019vm
+sk-tomnext host_name=tomnext
sk-testvm host_name=testvm
sk-torrent host_name=torrent
@@ -228,6 +229,7 @@ ch-gnocchi
r3-cccamp19-dione
r3-cccamp19-helene
sk-2019vm
+sk-tomnext
[kvmguests]
emc-master
@@ -254,6 +256,7 @@ ele-mur
sk-2019
sk-cloudia
sk-2019vm
+sk-tomnext
[hcloud]
ch-mimas2
diff --git a/roles/zfs/base/tasks/Debian.yml b/roles/zfs/base/tasks/Debian.yml
index b9fdda95..e13c03f5 100644
--- a/roles/zfs/base/tasks/Debian.yml
+++ b/roles/zfs/base/tasks/Debian.yml
@@ -3,9 +3,28 @@
import_role:
name: prepare-dkms
-## TODO: make sure contrib repo is enabled
+- name: check if contrib apt component is enabled
+ assert:
+ msg: "Debian zfs packages are in contrib - please enable it using 'apt_repo_components'"
+ that:
+ - apt_repo_components is defined
+ - "'contrib' in apt_repo_components"
-- name: install zfs-dkms
+- name: install zfs-dkms (buster)
+ when: (ansible_distribution_major_version | int) == 10
+ block:
+ - name: add backports repo
+ include_role:
+ name: apt-repo/backports
+
+ - name: install zfs-dkms from backports
+ apt:
+ name: zfs-dkms
+ default_release: buster-backports
+ state: present
+
+- name: install zfs-dkms (bullseye and beyond)
+ when: (ansible_distribution_major_version | int) > 10
apt:
name: zfs-dkms
state: present