| |
@@ -66,12 +66,10 @@
|
| |
hosts = []
|
| |
variables = {}
|
| |
for subject in subjects:
|
| |
- if subject.startswith("docker:"):
|
| |
- image = subject[7:]
|
| |
- name, host_vars = inv_host(image, docker_extra_args)
|
| |
- if host_vars:
|
| |
- hosts.append(name)
|
| |
- variables[name] = host_vars
|
| |
+ name, host_vars = inv_host(subject, docker_extra_args)
|
| |
+ if host_vars:
|
| |
+ hosts.append(name)
|
| |
+ variables[name] = host_vars
|
| |
if not hosts:
|
| |
return EMPTY_INVENTORY
|
| |
return {"localhost": {"hosts": hosts, "vars": {}},
|
| |
@@ -79,7 +77,11 @@
|
| |
"_meta": {"hostvars": variables}}
|
| |
|
| |
|
| |
- def inv_host(image, docker_extra_args):
|
| |
+ def inv_host(subject, docker_extra_args):
|
| |
+ if not subject.startswith("docker:"):
|
| |
+ return None, EMPTY_INVENTORY
|
| |
+
|
| |
+ image = subject[7:]
|
| |
null = open(os.devnull, 'w')
|
| |
|
| |
try:
|
| |
Fix messages like:
Launching virtual machine for a33bc36b3d2133714cffba130a08db0433f71249029fe148cbe0056230f32d46