summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-02-27 18:55:44 +0200
committerzsdc <taras@vyos.io>2020-02-27 18:55:44 +0200
commitfff4b6531c93e662600c5af35b9f685233530274 (patch)
tree4d69ff057fa177196e85c789eb049d72ffd4593a
parent9fca551d381b1000d47d370dd3618172a1617fb4 (diff)
downloadvyos-vm-images-fff4b6531c93e662600c5af35b9f685233530274.tar.gz
vyos-vm-images-fff4b6531c93e662600c5af35b9f685233530274.zip
Added /boot/ directory to the squashfs image for PXE
With /boot/ directory it is possible not only run VyOS in-memory but also install it via PXE too in a native way
-rw-r--r--roles/create-pxe-archive/tasks/main.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/create-pxe-archive/tasks/main.yml b/roles/create-pxe-archive/tasks/main.yml
index 11dc454..1fe6e93 100644
--- a/roles/create-pxe-archive/tasks/main.yml
+++ b/roles/create-pxe-archive/tasks/main.yml
@@ -20,6 +20,7 @@
- pxe is defined
- pxe == "true"
+# We need to skip boot directory (it contain too much unneeded items) and cc_vyos.py (optionally - may conflict with User-Data handler)
- name: Create new squashfs image
become: true
command: "mksquashfs {{ vyos_install_root }} /tmp/vyos-pxe-{{ vyos_version }}{{ ci_tag | default() }}/filesystem.squashfs -comp gzip -no-progress -Xcompression-level 9 -e {{ vyos_install_root }}/boot -e {{ vyos_install_root }}/usr/lib/python3/dist-packages/cloudinit/config/cc_vyos.py"
@@ -27,6 +28,13 @@
- pxe is defined
- pxe == "true"
+- name: Add the /boot directory
+ become: true
+ command: "mksquashfs {{ vyos_read_root }}/boot /tmp/vyos-pxe-{{ vyos_version }}{{ ci_tag | default() }}/filesystem.squashfs -keep-as-directory -comp gzip -no-progress -Xcompression-level 9"
+ when:
+ - pxe is defined
+ - pxe == "true"
+
- name: Create an archive with files for PXE
become: true
archive: