diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-12-25 18:20:54 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-12-25 18:20:54 +0100 |
commit | 2a89948bf13307cc936756c3a43bed51b3b49dc2 (patch) | |
tree | a058e111112f03a8dd769efaeb0bf7b4c0a31c71 /roles/installer/openbsd/autoinstall/tasks | |
parent | installer: move bootstrap roles to common subdir (diff) |
openbsd vm install almost works now
Diffstat (limited to 'roles/installer/openbsd/autoinstall/tasks')
-rw-r--r-- | roles/installer/openbsd/autoinstall/tasks/main.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/roles/installer/openbsd/autoinstall/tasks/main.yml b/roles/installer/openbsd/autoinstall/tasks/main.yml new file mode 100644 index 00000000..333b437f --- /dev/null +++ b/roles/installer/openbsd/autoinstall/tasks/main.yml @@ -0,0 +1,41 @@ +--- +- name: create basic cd-image directory structure + file: + path: "{{ obsd_autoinstall_tmpdir }}/files/etc" + state: directory + +- name: extract installer files from iso + vars: + arch: "{{ hostvars[hostname].install_cooked.arch | default('amd64') }}" + version: "{{ install_codename }}" + iso_extract: + image: "{{ installer_path }}/openbsd-{{ version }}/{{ arch }}/cd.iso" + dest: "{{ obsd_autoinstall_tmpdir }}/files" + files: + - "{{ version }}/{{ arch }}/cdbr" + - "{{ version }}/{{ arch }}/cdboot" + - "{{ version }}/{{ arch }}/bsd.rd" + +- name: generate bootloader and installer configuration + loop: + - auto_install.conf + - boot.conf + template: + src: "{{ item }}.j2" + dest: "{{ obsd_autoinstall_tmpdir }}/files/etc/{{ item }}" + +- name: generate random seed + shell: "head -c512 < /dev/random > {{ obsd_autoinstall_tmpdir }}/files/etc/random.seed" + +- name: generate host specific installer image + command: 'genisoimage -RTLldDN -o "cd.iso" -no-emul-boot -b "cdbr" -c "boot.catalog" files/' + args: + chdir: "{{ obsd_autoinstall_tmpdir }}/" + +# - print instructions +# * attach to console +# * select (S)hell +# * # mount_cd9660 /dev/cd0c /mnt +# * # cp /mnt/etc/auto_install.conf / +# * # autoinstall +# |