From f6cdb164c44facf996741959565834b008aa0e75 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 15 Oct 2014 08:51:05 -0400 Subject: [PATCH] Fixed a bug in the ansible driver for OpenStack --- planetstack/openstack_observer/ansible.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.43.0