summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--roles/install-config/templates/config.boot.j24
2 files changed, 8 insertions, 2 deletions
diff --git a/README.md b/README.md
index dacf670..394a712 100644
--- a/README.md
+++ b/README.md
@@ -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