Wait for Server to reboot - float object has no element

222 views
Skip to first unread message

Donal

unread,
Jul 14, 2016, 12:51:01 PM7/14/16
to Ansible Project
Hi there,

I'm having problems with implementing a play from this article that waits for a server to reboot and then carries on with other tasks. The playbook runs fine down to this task


The playbook I have performs several functions (which I've commented out for testing including the server reboot function for now) and then reboots the server. The wait function is give me an error though

- name: Wait for server reboot
  local_action: wait_for host={{ ipaddress }} state=started delay=30 timeout=300
  sudo: false
TASK [Wait for server reboot] **************************************************
task path: /etc/ansible/playbooks/nodeprereqs.yml:27
fatal: [ipaddress]: FAILED! => {"failed": true, "msg": "float object has no element 155"}

NO MORE HOSTS LEFT *************************************************************

I've tried several variants of the play all getting the same error above. Right now the current playbook looks like this (minus the other comment out tasks)

---
- hosts: TestServers 
  become: yes
  become_method: su
  tasks:
  - name: Wait for server reboot
    wait_for: host={{ ipaddress }} port=22 state=started delay=30 timeout=300
    connection: local
  - name: Next task
    command: do something

I run the playbook as usual

ansible-playbook -vvv nodeprereqs.yml -u username --ask-pass --ask-su-pass



Reply all
Reply to author
Forward
0 new messages