aboutsummaryrefslogtreecommitdiffstats
path: root/packer/templates
diff options
context:
space:
mode:
Diffstat (limited to 'packer/templates')
-rw-r--r--packer/templates/basebuild-local-kvm.json5
-rw-r--r--packer/templates/basebuild.json5
2 files changed, 10 insertions, 0 deletions
diff --git a/packer/templates/basebuild-local-kvm.json b/packer/templates/basebuild-local-kvm.json
index af13744f..36c77f42 100644
--- a/packer/templates/basebuild-local-kvm.json
+++ b/packer/templates/basebuild-local-kvm.json
@@ -77,6 +77,11 @@
"provision/agl_dependencies.sh",
"provision/system_reseal.sh"
],
+ "environment_vars": [
+ "LAVAHOST={{user `lavahost`}}",
+ "LAVAUSER={{user `lavauser`}}",
+ "LAVATOKEN={{user `lavatoken`}}"
+ ],
"execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else echo 'ubuntu' | {{ .Vars }} sudo -S -E sh '{{ .Path }}'; fi"
}
]
diff --git a/packer/templates/basebuild.json b/packer/templates/basebuild.json
index b757f6af..8e60b5f9 100644
--- a/packer/templates/basebuild.json
+++ b/packer/templates/basebuild.json
@@ -41,6 +41,11 @@
},
{
"type": "shell",
+ "environment_vars": [
+ "LAVAHOST={{user `lavahost`}}",
+ "LAVAUSER={{user `lavauser`}}",
+ "LAVATOKEN={{user `lavatoken`}}"
+ ],
"scripts": [
"provision/baseline.sh",
"provision/basebuild.sh",