Fixed a bug in the ansible driver for OpenStack
[plstackapi.git] / planetstack / openstack_observer / ansible.py
index 2574f60..89fb044 100755 (executable)
@@ -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