private key must not be world or group readable
diff --git a/xos/openstack_observer/ansible.py b/xos/openstack_observer/ansible.py
index 5f7e77d..5b6bd1d 100644
--- a/xos/openstack_observer/ansible.py
+++ b/xos/openstack_observer/ansible.py
@@ -162,6 +162,9 @@
f.write("%s ansible_ssh_private_key_file=%s\n" % (hostname, private_key_pathname))
f.close()
+ # SSH will complain if private key is world or group readable
+ os.chmod(private_key_pathname, 0600)
+
print "ANSIBLE_CONFIG=%s" % config_pathname
print "ANSIBLE_HOSTS=%s" % hosts_pathname