summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/install-grub/tasks/main.yml8
-rw-r--r--roles/qemu-raw/tasks/main.yml2
-rw-r--r--roles/qemu-raw/tests/inventory2
-rw-r--r--roles/qemu-raw/tests/test.yml5
-rw-r--r--roles/setup-root-partition/tasks/main.yml2
5 files changed, 18 insertions, 1 deletions
diff --git a/roles/install-grub/tasks/main.yml b/roles/install-grub/tasks/main.yml
index a711b5e..974f011 100644
--- a/roles/install-grub/tasks/main.yml
+++ b/roles/install-grub/tasks/main.yml
@@ -18,7 +18,14 @@
args:
warn: no
+- name: Create efi directory
+ become: true
+ file:
+ path: "{{ vyos_install_root }}/boot/grub"
+ state: directory
+
- name: Mount EFI
+ become: true
mount:
src: "{{ vyos_target_drive }}p2"
path: "{{ vyos_install_root }}/boot/efi"
@@ -43,6 +50,7 @@
mode: 0644
- name: Unmount EFI
+ become: true
mount:
src: "{{ vyos_target_drive }}p2"
path: "{{ vyos_install_root }}/boot/efi"
diff --git a/roles/qemu-raw/tasks/main.yml b/roles/qemu-raw/tasks/main.yml
new file mode 100644
index 0000000..aebcb3e
--- /dev/null
+++ b/roles/qemu-raw/tasks/main.yml
@@ -0,0 +1,2 @@
+- name: set raw image to the correct name
+ command: mv "{{ vyos_raw_img }}" "{{ vyos_qemu_raw_img }}"
diff --git a/roles/qemu-raw/tests/inventory b/roles/qemu-raw/tests/inventory
new file mode 100644
index 0000000..878877b
--- /dev/null
+++ b/roles/qemu-raw/tests/inventory
@@ -0,0 +1,2 @@
+localhost
+
diff --git a/roles/qemu-raw/tests/test.yml b/roles/qemu-raw/tests/test.yml
new file mode 100644
index 0000000..3a654b5
--- /dev/null
+++ b/roles/qemu-raw/tests/test.yml
@@ -0,0 +1,5 @@
+---
+- hosts: localhost
+ remote_user: root
+ roles:
+ - qemu-raw
diff --git a/roles/setup-root-partition/tasks/main.yml b/roles/setup-root-partition/tasks/main.yml
index 308cf10..57ba5ae 100644
--- a/roles/setup-root-partition/tasks/main.yml
+++ b/roles/setup-root-partition/tasks/main.yml
@@ -7,7 +7,7 @@
become: true
shell: "kpartx -av {{ vyos_raw_img }} | awk '{ print $3 }'"
register: loop_partitions
-
+
- name: Find loop device path
become: true
shell: "losetup -l -O NAME,BACK-FILE | awk '{ if (match($2, \"{{ vyos_raw_img }}\")) print $1}'"