--- - name: create basic cd-image directory structure loop: - etc - sets file: path: "{{ obsd_autoinstall_tmpdir }}/files/{{ item }}" state: directory - name: extract installer files from iso iso_extract: image: "{{ installer_path }}/openbsd-{{ obsd_autoinstall_version }}/{{ obsd_autoinstall_arch }}/install.iso" dest: "{{ obsd_autoinstall_tmpdir }}/files" files: - "{{ obsd_autoinstall_version }}/{{ obsd_autoinstall_arch }}/cdbr" - "{{ obsd_autoinstall_version }}/{{ obsd_autoinstall_arch }}/cdboot" - "{{ obsd_autoinstall_version }}/{{ obsd_autoinstall_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: extract file-sets from iso vars: set_names: - bsd - bsd.rd - "INSTALL.{{ obsd_autoinstall_arch }}" - "{{ obsd_autoinstall_file_sets | product([obsd_autoinstall_version_short+'.tgz']) | map('join') | list }}" iso_extract: image: "{{ installer_path }}/openbsd-{{ obsd_autoinstall_version }}/{{ obsd_autoinstall_arch }}/install.iso" dest: "{{ obsd_autoinstall_tmpdir }}/files/sets" files: "{{ [obsd_autoinstall_version+'/'+obsd_autoinstall_arch+'/'] | product(set_names | flatten) | map('join') | list }}" - name: generate host specific installer image command: 'genisoimage -RTLldDN -o "install.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 #