From 40e6be99ab4e95a27c0f13de3ad6b93c7ddb2674 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A9na=C3=AFc=20Huard?= <lhuard@amadeus.com>
Date: Tue, 11 Aug 2015 16:22:03 +0200
Subject: Prevent Ansible from serializing tasks

even if the ssh known_host file misses the ssh public host keys of the servers.
---
 bin/cluster | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/bin/cluster b/bin/cluster
index 7eb4a4448..c80fe0cab 100755
--- a/bin/cluster
+++ b/bin/cluster
@@ -23,6 +23,16 @@ class Cluster(object):
                 '-o ControlMaster=auto '
                 '-o ControlPersist=600s '
             )
+            # Because of `UserKnownHostsFile=/dev/null`
+            # our `.ssh/known_hosts` file most probably misses the ssh host public keys
+            # of our servers.
+            # In that case, ansible serializes the execution of ansible modules
+            # because we might be interactively prompted to accept the ssh host public keys.
+            # Because of `StrictHostKeyChecking=no` we know that we won't be prompted
+            # So, we don't want our modules execution to be serialized.
+            os.environ['ANSIBLE_HOST_KEY_CHECKING'] = 'False'
+            # TODO: A more secure way to proceed would consist in dynamically
+            # retrieving the ssh host public keys from the IaaS interface
 
     def get_deployment_type(self, args):
         """
-- 
cgit v1.2.3