From ce1fda5efa0aa38f3d4537606af36f807866c74a Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Wed, 9 Mar 2016 15:40:03 +0100 Subject: [PATCH] Only pause in VMs when performing multinode testing When we use a single VM, there is no need to wait extra time for keyscan to complete. Add a flag to wait this additional time when we perform multinode testing, such as in DHCP test. Change-Id: I10a54a91af145d6d44873865f5b7df48c68c59c7 --- .../roles/bifrost-prepare-for-test-dynamic/defaults/main.yml | 1 + playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml | 1 + playbooks/test-bifrost-dhcp.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml b/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml index 53ee3dccf..676d69edc 100644 --- a/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml +++ b/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml @@ -1,3 +1,4 @@ --- node_ssh_pause: 10 wait_timeout: 900 +multinode_testing: false diff --git a/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml b/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml index 61423cd11..5729ecd6e 100644 --- a/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml @@ -27,6 +27,7 @@ when: ipv4_address is defined - name: "Pause before asking for keyscan, to avoid races" pause: minutes=2 + when: multinode_testing | bool == true - name: "Add testvm hosts from SSH known_hosts file." shell: ssh-keyscan "{{ ipv4_address }}" >> "{{ ansible_env.HOME }}/.ssh/known_hosts" when: ipv4_address is defined diff --git a/playbooks/test-bifrost-dhcp.yaml b/playbooks/test-bifrost-dhcp.yaml index dacb26632..cf8280451 100644 --- a/playbooks/test-bifrost-dhcp.yaml +++ b/playbooks/test-bifrost-dhcp.yaml @@ -73,6 +73,7 @@ - hosts: baremetal vars: inventory_dhcp_static_ip: "{{ inventory_dhcp_static_ip | bool }}" + multinode_testing: true name: "Creat configuration drive files and deploy machines." become: no connection: local