Add (start of) USB installer
authornicoo <nicoo@realraum.at>
Sun, 17 Jun 2018 20:30:39 +0000 (22:30 +0200)
committernicoo <nicoo@realraum.at>
Sat, 24 Nov 2018 23:30:26 +0000 (00:30 +0100)
ansible/roles/usb-install/meta/main.yml [new file with mode: 0644]
ansible/usb-install.sh [new symlink]
ansible/usb-install.yml [new file with mode: 0644]
ansible/vm-install.sh

diff --git a/ansible/roles/usb-install/meta/main.yml b/ansible/roles/usb-install/meta/main.yml
new file mode 100644 (file)
index 0000000..4fbb746
--- /dev/null
@@ -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 (symlink)
index 0000000..bd4a66a
--- /dev/null
@@ -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 (file)
index 0000000..20b3ae6
--- /dev/null
@@ -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"
index 47291ed..0846422 100755 (executable)
@@ -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