aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/vm1.rgoncalves.se.yml2
-rw-r--r--roles/bhyve/templates/alpine.conf.j27
-rw-r--r--roles/sourcehut/tasks/main.yml14
3 files changed, 22 insertions, 1 deletions
diff --git a/playbooks/vm1.rgoncalves.se.yml b/playbooks/vm1.rgoncalves.se.yml
index 77f39cc..23a559c 100644
--- a/playbooks/vm1.rgoncalves.se.yml
+++ b/playbooks/vm1.rgoncalves.se.yml
@@ -10,4 +10,4 @@
- { role: grafana }
# - { role: nextcloud }
- # - { role: sourcehut }
+ - { role: sourcehut }
diff --git a/roles/bhyve/templates/alpine.conf.j2 b/roles/bhyve/templates/alpine.conf.j2
index 9baf5c2..69979c0 100644
--- a/roles/bhyve/templates/alpine.conf.j2
+++ b/roles/bhyve/templates/alpine.conf.j2
@@ -8,6 +8,13 @@ network0_switch="{{ guest_switch }}"
disk0_type="virtio-blk"
disk0_name="disk0.img"
+{% for disk in guest_disks if disk.path is defined %}
+disk{{ disk.id }}_dev="custom"
+disk{{ disk.id }}_opts="sectorsize=512"
+disk{{ disk.id }}_type="ahci-hd"
+disk{{ disk.id }}_name="{{ disk.path }}"
+{% endfor %}
+
grub_install0="linux /boot/vmlinuz-virt initrd=/boot/initramfs-virt alpine_dev=cdrom:iso9660 modules=loop,squashfs,sd-mod,usb-storage,sr-mod"
grub_install1="initrd /boot/initramfs-virt"
grub_run0="linux /boot/vmlinuz-virt root=/dev/vda3 modules=ext4"
diff --git a/roles/sourcehut/tasks/main.yml b/roles/sourcehut/tasks/main.yml
new file mode 100644
index 0000000..95eff76
--- /dev/null
+++ b/roles/sourcehut/tasks/main.yml
@@ -0,0 +1,14 @@
+
+# sourcehut ~~ roles/sourcehut/tasks/main.yml
+# configure sourcehut for alpine host
+
+---
+
+- name: enable sourcehut repository
+ shell: |
+ echo "https://mirror.sr.ht/alpine/v3.12/sr.ht" >> /etc/apk/repositories
+ wget -q -O /etc/apk/keys/alpine@sr.ht.rsa.pub https://mirror.sr.ht/alpine/alpine@sr.ht.rsa.pub
+ apk update
+
+- name: download sourcehut base packages
+ shell: echo a
remember that computers suck.