mirror of
https://github.com/Rudd-O/ansible-qubes.git
synced 2025-03-01 14:22:33 +01:00
Merge pull request #18 from ProfessorManhattan/master
Missing encoding for qubesformation
This commit is contained in:
commit
c4029694fb
@ -96,6 +96,8 @@ def inject_qubes(inject):
|
|||||||
pass
|
pass
|
||||||
elif vmtype == "ProxyVM":
|
elif vmtype == "ProxyVM":
|
||||||
add(flags, "proxy")
|
add(flags, "proxy")
|
||||||
|
elif vmtype == "DispVM":
|
||||||
|
pass
|
||||||
elif vmtype == "TemplateVM":
|
elif vmtype == "TemplateVM":
|
||||||
try:
|
try:
|
||||||
qubes["source"] = qubes["template"]
|
qubes["source"] = qubes["template"]
|
||||||
|
@ -99,7 +99,7 @@ class ActionModule(template):
|
|||||||
qubesdata = commonlib.inject_qubes(task_vars)
|
qubesdata = commonlib.inject_qubes(task_vars)
|
||||||
task_vars["vms"] = generate_datastructure(qubesdata, task_vars)
|
task_vars["vms"] = generate_datastructure(qubesdata, task_vars)
|
||||||
with tempfile.NamedTemporaryFile() as x:
|
with tempfile.NamedTemporaryFile() as x:
|
||||||
x.write(contents)
|
x.write(contents.encode())
|
||||||
x.flush()
|
x.flush()
|
||||||
self._task.args['src'] = x.name
|
self._task.args['src'] = x.name
|
||||||
retval = template.run(self, tmp, task_vars)
|
retval = template.run(self, tmp, task_vars)
|
||||||
@ -107,7 +107,7 @@ class ActionModule(template):
|
|||||||
return retval
|
return retval
|
||||||
|
|
||||||
with tempfile.NamedTemporaryFile() as y:
|
with tempfile.NamedTemporaryFile() as y:
|
||||||
y.write(topcontents)
|
y.write(topcontents.encode())
|
||||||
y.flush()
|
y.flush()
|
||||||
|
|
||||||
# Create new tmp path -- the other was blown away.
|
# Create new tmp path -- the other was blown away.
|
||||||
|
@ -352,7 +352,7 @@ def main_master():
|
|||||||
assert remote_command
|
assert remote_command
|
||||||
|
|
||||||
def anypython(exe):
|
def anypython(exe):
|
||||||
return "` test -x %s && echo %s || echo python`" % (
|
return "` test -x %s && echo %s || echo python3`" % (
|
||||||
quote(exe),
|
quote(exe),
|
||||||
quote(exe),
|
quote(exe),
|
||||||
)
|
)
|
||||||
|
@ -313,7 +313,7 @@ class Connection(ConnectionBase):
|
|||||||
if not self._connected:
|
if not self._connected:
|
||||||
remote_cmd = [to_bytes(x, errors='surrogate_or_strict') for x in [
|
remote_cmd = [to_bytes(x, errors='surrogate_or_strict') for x in [
|
||||||
# 'strace', '-s', '2048', '-o', '/tmp/log',
|
# 'strace', '-s', '2048', '-o', '/tmp/log',
|
||||||
'python', '-u', '-i', '-c', preamble
|
'python3', '-u', '-i', '-c', preamble
|
||||||
]]
|
]]
|
||||||
addr = self._play_context.remote_addr
|
addr = self._play_context.remote_addr
|
||||||
proxy = to_bytes(self.get_option("management_proxy")) if self.get_option("management_proxy") else ""
|
proxy = to_bytes(self.get_option("management_proxy")) if self.get_option("management_proxy") else ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user