Merge pull request #2045 from ceph/reboot

ci: reboot with ansible instead of vagrant reload
pull/2048/head
Guillaume Abrioux 2017-10-13 10:43:19 +02:00 committed by GitHub
commit 80c62e05e7
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,16 @@
---
- hosts: all
gather_facts: true
tasks:
# why sleep 2? see here: https://github.com/ansible/ansible/issues/14413
- name: reboot the machines
shell: sleep 2 && shutdown -r now
become: yes
async: 1
poll: 0
- name: waiting 3 minutes for the machines to come back
local_action: wait_for host={{ ansible_default_ipv4.address }} port=22 state=started delay=30 timeout=180
- name: uptime
command: uptime

View File

@ -224,7 +224,7 @@ commands=
testinfra -n 8 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests testinfra -n 8 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
# reboot all vms # reboot all vms
vagrant reload --no-provision ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/reboot.yml
# wait 2 minutes for services to be ready # wait 2 minutes for services to be ready
sleep 120 sleep 120