Fix inventory vars containing spaces
Some clouds have availability zones with spaces in their
names. Currently zuul generates something like this as ansible
inventory:
node nodepool_region=None (...) nodepool_az=Failure domain 1
This breaks ansible when trying to read the inventory. Quoting the
inventory variable values solves this issue.
Change-Id: I3e97f40986689b3779efc448eb0d5f1db009e796
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 4801de2..78473a3 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -942,7 +942,7 @@
for item in self.getHostList(args):
inventory.write(item['name'])
for k, v in item['host_vars'].items():
- inventory.write(' %s=%s' % (k, v))
+ inventory.write(' %s="%s"' % (k, v))
inventory.write('\n')
for key in item['host_keys']:
keys.append(key)