diff options
author | zsdc <taras@vyos.io> | 2020-02-24 23:42:19 +0200 |
---|---|---|
committer | zsdc <taras@vyos.io> | 2020-02-26 18:23:14 +0200 |
commit | 9fca551d381b1000d47d370dd3618172a1617fb4 (patch) | |
tree | d79001670319486f97ee76e3fce7e52c225164c6 /roles/unmount-pre | |
parent | 332dbe851c44543b69e516439baf203c9bebcadc (diff) | |
download | vyos-vm-images-9fca551d381b1000d47d370dd3618172a1617fb4.tar.gz vyos-vm-images-9fca551d381b1000d47d370dd3618172a1617fb4.zip |
Fixes and additions in QEMU image building
* Fixed deleting APT lists from a cache to decrease resulting image size
* Added option for creating an archive with files required for boot via PXE
* Added option for keeping default user when creating an image with Cloud-init
Diffstat (limited to 'roles/unmount-pre')
-rw-r--r-- | roles/unmount-pre/tasks/main.yml | 18 | ||||
-rw-r--r-- | roles/unmount-pre/tests/inventory | 2 | ||||
-rw-r--r-- | roles/unmount-pre/tests/test.yml | 4 |
3 files changed, 24 insertions, 0 deletions
diff --git a/roles/unmount-pre/tasks/main.yml b/roles/unmount-pre/tasks/main.yml new file mode 100644 index 0000000..12c9ae7 --- /dev/null +++ b/roles/unmount-pre/tasks/main.yml @@ -0,0 +1,18 @@ +# Unmount /sys /proc /dev +- name: Unmount {{ vyos_install_root }}/sys, {{ vyos_install_root }}/proc, {{ vyos_install_root }}/dev + become: true + mount: + name: "{{ vyos_install_root }}/{{ item }}" + src: "/{{ item }}" + fstype: none + state: unmounted + with_items: [ 'sys', 'proc', 'dev' ] + +- name: Unmount {{ vyos_install_root }}/sys, {{ vyos_install_root }}/proc, {{ vyos_install_root }}/dev + become: true + mount: + name: "{{ vyos_install_root }}/{{ item }}" + src: "/{{ item }}" + fstype: none + state: absent + with_items: [ 'sys', 'proc', 'dev' ] diff --git a/roles/unmount-pre/tests/inventory b/roles/unmount-pre/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/unmount-pre/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/unmount-pre/tests/test.yml b/roles/unmount-pre/tests/test.yml new file mode 100644 index 0000000..105c5e6 --- /dev/null +++ b/roles/unmount-pre/tests/test.yml @@ -0,0 +1,4 @@ +--- +- hosts: localhost + roles: + - unmount-pre |