CPERF: Fixes issue with known hosts 31/65431/1
authorTim Rozet <trozet@redhat.com>
Tue, 27 Nov 2018 21:48:55 +0000 (16:48 -0500)
committerTim Rozet <trozet@redhat.com>
Tue, 27 Nov 2018 21:48:55 +0000 (16:48 -0500)
Exporting the global var to disable ansible host key checking doesn't
ignore known hosts in the file. To fix this, this patch sets the known
hosts file to /dev/null.

Reference: https://github.com/ansible/ansible/issues/9442

Jobs currently failing due to known hosts:
https://build.opnfv.org/ci/job/cperf-apex-csit-master/320/console

Change-Id: Ic3470b368a056b3a3981f9555160a44018f97ebd
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/cperf/cperf-robot-netvirt-csit.sh

index 892f0aa..fe5d578 100755 (executable)
@@ -90,7 +90,7 @@ fi
 # Upload glance image into openstack
 wget -O ${WORKSPACE}/cirros-0.3.5-x86_64-disk.img http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
 export ANSIBLE_HOST_KEY_CHECKING=False
-ansible-playbook -i ${CONTROLLER_1_IP}, -u heat-admin --key-file ${WORKSPACE}/id_rsa ${REL_PATH}/cirros-upload.yaml.ansible -vvv
+ansible-playbook -i ${CONTROLLER_1_IP}, -u heat-admin --key-file ${WORKSPACE}/id_rsa ${REL_PATH}/cirros-upload.yaml.ansible --ssh-extra-args='-o StrictHostKeyChecking=no  -o UserKnownHostsFile=/dev/null' -vvv
 
 LOGS_LOCATION=/tmp/robot_results
 
@@ -185,4 +185,4 @@ docker run -i --net=host \
   ${robot_cmd} ${suites};"
 
 echo "Running post CSIT clean"
-ansible-playbook -i ${CONTROLLER_1_IP}, -u heat-admin --key-file ${WORKSPACE}/id_rsa ${REL_PATH}/csit-clean.yaml.ansible -vvv
+ansible-playbook -i ${CONTROLLER_1_IP}, -u heat-admin --key-file ${WORKSPACE}/id_rsa ${REL_PATH}/csit-clean.yaml.ansible --ssh-extra-args='-o StrictHostKeyChecking=no  -o UserKnownHostsFile=/dev/null' -vvv