summaryrefslogtreecommitdiff
path: root/roles/compress-image
diff options
context:
space:
mode:
authorKim <kim.sidney@gmail.com>2021-06-28 12:57:35 +0200
committerGitHub <noreply@github.com>2021-06-28 12:57:35 +0200
commitb077c2942620581bdb519e6584a40cb383a841e0 (patch)
tree5d9e98c1be886bb2bf9bc3d9da676c78caa90fda /roles/compress-image
parente0ad618192bd652f7a26ed4f34265d4f7de9c45b (diff)
downloadvyos-vm-images-b077c2942620581bdb519e6584a40cb383a841e0.tar.gz
vyos-vm-images-b077c2942620581bdb519e6584a40cb383a841e0.zip
add ability to rebuild an ISO
Diffstat (limited to 'roles/compress-image')
-rw-r--r--roles/compress-image/tasks/main.yml10
-rw-r--r--roles/compress-image/tests/inventory2
-rw-r--r--roles/compress-image/tests/test.yml4
3 files changed, 16 insertions, 0 deletions
diff --git a/roles/compress-image/tasks/main.yml b/roles/compress-image/tasks/main.yml
new file mode 100644
index 0000000..99135fa
--- /dev/null
+++ b/roles/compress-image/tasks/main.yml
@@ -0,0 +1,10 @@
+---
+- name: Delete filesystem.squashfs
+ become: true
+ file:
+ path: "/tmp/live-{{ vyos_version }}/live/filesystem.squashfs"
+ state: absent
+
+- name: compress path to squashfs image
+ become: true
+ command: mksquashfs {{ vyos_install_root }} /tmp/live-{{ vyos_version }}/live/filesystem.squashfs -comp xz
diff --git a/roles/compress-image/tests/inventory b/roles/compress-image/tests/inventory
new file mode 100644
index 0000000..878877b
--- /dev/null
+++ b/roles/compress-image/tests/inventory
@@ -0,0 +1,2 @@
+localhost
+
diff --git a/roles/compress-image/tests/test.yml b/roles/compress-image/tests/test.yml
new file mode 100644
index 0000000..96c69cb
--- /dev/null
+++ b/roles/compress-image/tests/test.yml
@@ -0,0 +1,4 @@
+---
+- hosts: localhost
+ roles:
+ - install-image