X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=ansible%2Fusb-install.yml;h=5f3c9a58fa66710b08ed46c2bb1e9a7ed21f4aa9;hb=HEAD;hp=7ef386d87c9773bd84ed7f83b3770d4fb2186ef4;hpb=6680fe9de19ca2fadf84a4232d7ece57c0066798;p=noc.git diff --git a/ansible/usb-install.yml b/ansible/usb-install.yml index 7ef386d..5f3c9a5 100644 --- a/ansible/usb-install.yml +++ b/ansible/usb-install.yml @@ -2,6 +2,7 @@ - name: Fetch debian installer and bake initrd hosts: "{{ hostname }}" connection: local + gather_facts: no vars_prompt: - name: usbdrive_path @@ -9,21 +10,16 @@ default: "" private: no - vars: - preseed_path: "{{ global_artifacts_dir }}/{{ hostname }}" - debian_installer_path: "{{ global_cache_dir }}/debian-installer" - pre_tasks: - set_fact: install_cooked: "{{ install }}" network_cooked: "{{ network }}" + artifacts_dir: "{{ global_artifacts_dir }}/{{ hostname }}" + debian_installer_path: "{{ global_cache_dir }}/debian-installer" - file: state: directory - name: "{{ item }}" - with_items: - - "{{ preseed_path }}" - - "{{ debian_installer_path }}" + name: "{{ artifacts_dir }}" roles: - usb-install @@ -37,11 +33,13 @@ block: - name: Copy generated files to the USB drive copy: - src: "{{ item.value }}" - dest: "{{ usbdrive_path }}/{{ item.key }}" - with_dict: - initrd.gz: "{{ global_artifacts_dir }}/{{ hostname }}/{{ hostname }}-{{ install_distro }}-{{ install_codename }}.initrd.gz" - linux: "{{ global_cache_dir }}/debian-installer/{{ install_distro }}-{{ install_codename }}/{{ install.arch | default('amd64') }}/linux" + src: "{{ item }}" + dest: "{{ usbdrive_path }}/" + with_items: + - "{{ artifacts_dir }}/initrd.preseed.gz" + - "{{ global_cache_dir }}/debian-installer/{{ install_distro }}-{{ install_codename }}/{{ install.arch | default('amd64') }}/linux" + loop_control: + label: "{{ item | basename }}" - name: Generate syslinux configuration copy: @@ -51,8 +49,8 @@ SAY SYSLINUX booting an automated installer for {{ hostname }}... LABEL linux KERNEL linux - INITRD initrd.gz - APPEND install vga=off console=ttyS0,115200n8 + INITRD initrd.preseed.gz + APPEND install {{ (install.kernel_cmdline | default([])) | join(' ') }} - name: Make the USB disk bootable pause: