summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-12-23 23:56:25 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-12-23 23:56:25 +0100
commit02e8e69cb1dd0f1a5445c973a317b40a230c62f3 (patch)
treede948df61c652740c7eeb997e74f0275060c80b6 /roles
parentopenbsd: try to enable com0 for kernel terminal (WIP) (diff)
openbsd automatic install, added todo
Diffstat (limited to 'roles')
-rw-r--r--roles/installer/openbsd/tasks/main.yml58
1 files changed, 22 insertions, 36 deletions
diff --git a/roles/installer/openbsd/tasks/main.yml b/roles/installer/openbsd/tasks/main.yml
index c6317284..fcc79589 100644
--- a/roles/installer/openbsd/tasks/main.yml
+++ b/roles/installer/openbsd/tasks/main.yml
@@ -12,45 +12,31 @@
label: "openbsd-{{ item.0.version }} {{ item.1 }}"
get_url:
url: "{{ openbsd_installer_url }}/{{ item.0.version }}/{{ item.1 }}/cd{{ item.0.version | replace('.', '') }}.iso"
- dest: "{{ installer_path }}/openbsd-{{ item.0.version }}/{{ item.1 }}/cd.iso"
+ dest: "{{ installer_path }}/openbsd-{{ item.0.version }}/{{ item.1 }}/cd-orig.iso"
mode: 0644
force: "{{ openbsd_installer_force_download }}"
-- name: install xorriso
+- name: install geniosimage
apt:
- name: xorriso
+ name: geniosimage
state: present
-## TODO: only do this if images have been updated
-- name: extract boot.conf from original iso image
- loop: "{{ openbsd_versions | subelements('arch') }}"
- loop_control:
- label: "openbsd-{{ item.0.version }} {{ item.1 }}"
- command: xorriso -osirrox on -dev cd.iso -extract etc/boot.conf boot.conf
- args:
- chdir: "{{ installer_path }}/openbsd-{{ item.0.version }}/{{ item.1 }}"
-
-- name: change boot.conf to switch to com0 as main tty
- loop: "{{ openbsd_versions | subelements('arch') }}"
- loop_control:
- label: "openbsd-{{ item.0.version }} {{ item.1 }}"
- lineinfile:
- path: "{{ installer_path }}/openbsd-{{ item.0.version }}/{{ item.1 }}/boot.conf"
- regexp: '^set\s+tty\s'
- line: "set tty com0"
-
-- name: make sure target image does not exist
- loop: "{{ openbsd_versions | subelements('arch') }}"
- loop_control:
- label: "openbsd-{{ item.0.version }} {{ item.1 }}"
- file:
- path: "{{ installer_path }}/openbsd-{{ item.0.version }}/{{ item.1 }}/cd-com0.iso"
- state: absent
-
-- name: generate target iso image
- loop: "{{ openbsd_versions | subelements('arch') }}"
- loop_control:
- label: "openbsd-{{ item.0.version }} {{ item.1 }}"
- command: xorriso -indev "cd.iso" -outdev "cd-com0.iso" -boot_image any keep -pathspecs on -add /etc/boot.conf=boot.conf
- args:
- chdir: "{{ installer_path }}/openbsd-{{ item.0.version }}/{{ item.1 }}"
+## TODO
+# - iso_extract from cd-orig.iso -> <<version>>/<<arch>>/{boot.catalog,cdbr,cdboot,bsd.rd}, etc/boot.conf
+# - add lines to etc/boot.conf -> stty com0 115200, set tty com0
+# - generate etc/auto_install.conf
+# - name: generate host specific installer image
+# loop: "{{ openbsd_versions | subelements('arch') }}"
+# loop_control:
+# label: "openbsd-{{ item.0.version }} {{ item.1 }}"
+# command: 'genisoimage -RTLldDN -o "cd-{{ ansible_nodename }}.iso" -no-emul-boot -b "{{ item.0.version }}/{{ item.1 }}/cdbr" -c "{{ item.0.version }}/{{ item.1 }}/boot.catalog" data-{{ ansible_nodename }}/'
+# args:
+# chdir: "{{ installer_path }}/openbsd-{{ item.0.version }}/{{ item.1 }}"
+#
+# - print instructions
+# * attach to console
+# * select (S)hell
+# * # mount_cd9660 /dev/cd0c /mnt
+# * # cp /mnt/etc/auto_install.conf /
+# * # autoinstall
+#