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
This commit is contained in:
Yolanda Robla 2016-03-09 15:40:03 +01:00
parent a8a262c67c
commit ce1fda5efa
3 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
--- ---
node_ssh_pause: 10 node_ssh_pause: 10
wait_timeout: 900 wait_timeout: 900
multinode_testing: false

View File

@ -27,6 +27,7 @@
when: ipv4_address is defined when: ipv4_address is defined
- name: "Pause before asking for keyscan, to avoid races" - name: "Pause before asking for keyscan, to avoid races"
pause: minutes=2 pause: minutes=2
when: multinode_testing | bool == true
- name: "Add testvm hosts from SSH known_hosts file." - name: "Add testvm hosts from SSH known_hosts file."
shell: ssh-keyscan "{{ ipv4_address }}" >> "{{ ansible_env.HOME }}/.ssh/known_hosts" shell: ssh-keyscan "{{ ipv4_address }}" >> "{{ ansible_env.HOME }}/.ssh/known_hosts"
when: ipv4_address is defined when: ipv4_address is defined

View File

@ -73,6 +73,7 @@
- hosts: baremetal - hosts: baremetal
vars: vars:
inventory_dhcp_static_ip: "{{ inventory_dhcp_static_ip | bool }}" inventory_dhcp_static_ip: "{{ inventory_dhcp_static_ip | bool }}"
multinode_testing: true
name: "Creat configuration drive files and deploy machines." name: "Creat configuration drive files and deploy machines."
become: no become: no
connection: local connection: local