summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmondson <dme@dme.org>2020-10-05 18:35:34 +0100
committerDavid Edmondson <dme@dme.org>2020-10-29 07:35:26 +0000
commitfe4851507c4fbbca6b8fe9355728d029e0586489 (patch)
tree5282b6b4c770908da2c641880d025ced3a40a746
parentc9a76219554e5e875d5e1342bfcb9b505e5d1da9 (diff)
downloadvmdb2-fe4851507c4fbbca6b8fe9355728d029e0586489.tar.gz
feat(state): Add a state variable indicating the target architecture
Defaulting to the architecture of the host where vmdb2 is running.
-rw-r--r--vmdb/app.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/vmdb/app.py b/vmdb/app.py
index ef12e51..83a8810 100644
--- a/vmdb/app.py
+++ b/vmdb/app.py
@@ -145,6 +145,7 @@ class ImageBuilder:
spec = self.load_spec_file(self._specfile)
state = vmdb.State()
state.tags = vmdb.Tags()
+ state.arch = vmdb.runcmd(["dpkg", "--print-architecture"]).decode("UTF-8").strip()
self.add_template_vars(state.as_dict())
steps = spec.get_steps(self._tvars)