Skip to content
Snippets Groups Projects
Commit e7d59dbb authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Fix the kolla_toolbox module do not work on docker engine 1.10"

parents 390a1204 1aaca08b
No related branches found
No related tags found
No related merge requests found
......@@ -87,14 +87,12 @@ def main():
module = AnsibleModule(argument_spec=specs, bypass_checks=True)
client = docker.Client()
command_line = gen_commandline(module.params)
kolla_toolbox = client.containers(all=True,
filters=dict(name='kolla_toolbox'))
kolla_toolbox = client.containers(filters=dict(name='kolla_toolbox',
status='running'))
if not kolla_toolbox:
module.fail_json(msg='Can not find kolla_toolbox container in target')
kolla_toolbox = kolla_toolbox[0]
if kolla_toolbox['State'] != 'running':
module.fail_json(msg='kolla_toolbox container is not running')
module.fail_json(msg='kolla_toolbox container is not running.')
kolla_toolbox = kolla_toolbox[0]
job = client.exec_create(kolla_toolbox, command_line)
output = client.exec_start(job)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment