summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-02-28 15:15:40 +0200
committerzsdc <taras@vyos.io>2020-02-28 15:15:40 +0200
commit4494eac16e2e84b668ffada58db4c9fc2a6b9d4f (patch)
treecdfd45e068f7ac75b83ccb6c538739bf8ca15830
parentfff4b6531c93e662600c5af35b9f685233530274 (diff)
downloadvyos-vm-images-4494eac16e2e84b668ffada58db4c9fc2a6b9d4f.tar.gz
vyos-vm-images-4494eac16e2e84b668ffada58db4c9fc2a6b9d4f.zip
Added option to exclude `cc_vyos` from Cloud-init
When Cloud-init metadata is not available this module can break configuration procedure or overwrite options, assigned via User-Data.
-rw-r--r--README.md5
-rw-r--r--roles/create-pxe-archive/tasks/main.yml9
2 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index cfc119f..635c145 100644
--- a/README.md
+++ b/README.md
@@ -99,3 +99,8 @@ You need to copy the ISO image with VyOS to /tmp/vyos.iso before running ansible
```
-e keep_user=true
```
+
+- Exclude the `cc_vyos` module from Cloud-init in the PXE archive. Mostly useful when you are building for non-cloud environments, where Cloud-init meta-data is not available (default: false):
+ ```
+ -e pxe_excl_module=true
+ ```
diff --git a/roles/create-pxe-archive/tasks/main.yml b/roles/create-pxe-archive/tasks/main.yml
index 1fe6e93..4471f27 100644
--- a/roles/create-pxe-archive/tasks/main.yml
+++ b/roles/create-pxe-archive/tasks/main.yml
@@ -27,6 +27,15 @@
when:
- pxe is defined
- pxe == "true"
+ - pxe_excl_module is defined
+ - pxe_excl_module == "true"
+
+- 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"
+ when:
+ - pxe is defined
+ - pxe == "true"
- name: Add the /boot directory
become: true