From cdbd9df937e524c1d89ef74c15a013e79359b9fc Mon Sep 17 00:00:00 2001 From: create with ansible Date: Thu, 8 Oct 2020 01:35:44 -0400 Subject: minor fixes --- roles/install-grub/tasks/main.yml | 7 +++++++ roles/qemu-raw/tasks/main.yml | 2 ++ roles/qemu-raw/tests/inventory | 2 ++ roles/qemu-raw/tests/test.yml | 5 +++++ roles/setup-root-partition/tasks/main.yml | 2 +- 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 roles/qemu-raw/tasks/main.yml create mode 100644 roles/qemu-raw/tests/inventory create mode 100644 roles/qemu-raw/tests/test.yml 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. -- cgit v1.2.3