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:
parent
a8a262c67c
commit
ce1fda5efa
@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
node_ssh_pause: 10
|
node_ssh_pause: 10
|
||||||
wait_timeout: 900
|
wait_timeout: 900
|
||||||
|
multinode_testing: false
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user