From: root Date: Wed, 15 Oct 2014 12:51:05 +0000 (-0400) Subject: Fixed a bug in the ansible driver for OpenStack X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f6cdb164c44facf996741959565834b008aa0e75;hp=cb7eb50537a41a7f60c5aa4b1166589d3359c9de;p=plstackapi.git Fixed a bug in the ansible driver for OpenStack --- diff --git a/planetstack/openstack_observer/ansible.py b/planetstack/openstack_observer/ansible.py index 2574f60..89fb044 100755 --- a/planetstack/openstack_observer/ansible.py +++ b/planetstack/openstack_observer/ansible.py @@ -19,11 +19,18 @@ def parse_output(msg): for l in lines: magic_str = 'ok: [127.0.0.1] => ' + magic_str2 = 'changed: [127.0.0.1] => ' if (l.startswith(magic_str)): w = len(magic_str) str = l[w:] d = json.loads(str) results.append(d) + elif (l.startswith(magic_str2)): + w = len(magic_str2) + str = l[w:] + d = json.loads(magic_str2) + results.append(d) + return results