diff options
author | zsdc <taras@vyos.io> | 2020-04-22 14:20:46 +0300 |
---|---|---|
committer | zsdc <taras@vyos.io> | 2020-04-22 14:20:46 +0300 |
commit | 6d85fa21b8dee034713770c21a1e2b11bc39fc51 (patch) | |
tree | b2ca2cc5b3e0f31c62ef2a1248b159b9326586a5 | |
parent | afca529c30e486e834ad5e98f18bfba5f40710ac (diff) | |
download | vyos-vm-images-6d85fa21b8dee034713770c21a1e2b11bc39fc51.tar.gz vyos-vm-images-6d85fa21b8dee034713770c21a1e2b11bc39fc51.zip |
Added option to create an image with empty config
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | roles/install-config/templates/config.boot.j2 | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -108,4 +108,10 @@ You need to copy the ISO image with VyOS to /tmp/vyos.iso before running ansible ``` -e keep_user=true + ``` + +- Create an image with empty configuration, do not add any default settings like eth0 address, SSH service (default: false): + + ``` + -e empty_config=true ```
\ No newline at end of file diff --git a/roles/install-config/templates/config.boot.j2 b/roles/install-config/templates/config.boot.j2 index 51e95b9..30506f8 100644 --- a/roles/install-config/templates/config.boot.j2 +++ b/roles/install-config/templates/config.boot.j2 @@ -33,7 +33,7 @@ system { } } interfaces { -{% if cloud_init == "true" %} +{% if cloud_init == "true" and not ( empty_config is defined and empty_config == "true" ) %} ethernet eth0 { address dhcp } @@ -41,7 +41,7 @@ interfaces { loopback lo { } } -{% if cloud_init == "true" %} +{% if cloud_init == "true" and not ( empty_config is defined and empty_config == "true" ) %} service { ssh { port 22 |