Quote commands when running ansible
Sapan Bhatia [Fri, 23 Jan 2015 16:16:27 +0000 (16:16 +0000)]
planetstack/openstack_observer/ansible.py

index 898b59a..41dc6f0 100644 (file)
@@ -63,7 +63,8 @@ def run_template(name, opts,path='', expected_num=None):
     f.write(buffer)
     f.flush()
 
-    run = os.popen('/opt/planetstack/observer/run_ansible '+fqp)
+    run = os.popen('/opt/planetstack/observer/run_ansible %s'%shellquote(fqp))
+    #run = os.popen('ansible-playbook -v %s'%shellquote(fqp))
     msg = run.read()
     status = run.close()