summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/install-grub/tasks/main.yml7
-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, 17 insertions, 1 deletions
diff --git a/roles/install-grub/tasks/main.yml b/roles/install-grub/tasks/main.yml
index f9cc772..dfe765d 100644
--- a/roles/install-grub/tasks/main.yml
+++ b/roles/install-grub/tasks/main.yml
@@ -19,8 +19,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"
@@ -45,6 +51,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 5ba9cd8..1f6df8d 100644
--- a/roles/setup-root-partition/tasks/main.yml
+++ b/roles/setup-root-partition/tasks/main.yml
@@ -14,7 +14,7 @@
- name: Find the loop device that was used, map to mapper
become: true
- shell: "losetup | grep vyos_raw_image.img | head -n1 | awk '{print $1}' | sed 's/dev/dev\\/mapper/g'"
+ shell: "losetup | grep {{ vyos_raw_img }} | head -n1 | awk '{print $1}' | sed 's/dev/dev\\/mapper/g'"
register: result
- name: Set vyos_target_drive.