From: nicoo Date: Sun, 17 Jun 2018 20:30:39 +0000 (+0200) Subject: Add (start of) USB installer X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=60560e9c57e62afe8105bd369299a8cb79229b71;p=noc.git Add (start of) USB installer --- diff --git a/ansible/roles/usb-install/meta/main.yml b/ansible/roles/usb-install/meta/main.yml new file mode 100644 index 0000000..4fbb746 --- /dev/null +++ b/ansible/roles/usb-install/meta/main.yml @@ -0,0 +1,8 @@ +dependencies: + - role: debian-installer + distros: + - distro: "{{ distro }}" + codename: "{{ distcodename }}" + arch: [ "{{ install.arch }}" ] + + - role: preseed diff --git a/ansible/usb-install.sh b/ansible/usb-install.sh new file mode 120000 index 0000000..bd4a66a --- /dev/null +++ b/ansible/usb-install.sh @@ -0,0 +1 @@ +vm-install.sh \ No newline at end of file diff --git a/ansible/usb-install.yml b/ansible/usb-install.yml new file mode 100644 index 0000000..20b3ae6 --- /dev/null +++ b/ansible/usb-install.yml @@ -0,0 +1,13 @@ +--- +- name: Fetch debian installer and bake initrd + hosts: "{{ hostname }}" + connection: local + pre_tasks: + - set_fact: + install_cooked: "{{ install }}" + network_cooked: "{{ network }}" + roles: + - usb-install + vars: + preseed_path: "{{ global_artifacts_dir }}" + debian_installer_path: "{{ global_cache_dir }}/debian-installer" diff --git a/ansible/vm-install.sh b/ansible/vm-install.sh index 47291ed..0846422 100755 --- a/ansible/vm-install.sh +++ b/ansible/vm-install.sh @@ -12,8 +12,8 @@ shift codename=$1 shift -echo "installing vm: $name with $distro/$codename" +echo "installing $name with $distro/$codename" echo "" echo "######## running the install playbook ########" -exec ansible-playbook -e "hostname=$name" -e "distro=$distro" -e "distcodename=$codename" $@ vm-install.yml +exec ansible-playbook -e "hostname=$name" -e "distro=$distro" -e "distcodename=$codename" $@ $(basename "$0" .sh).yml