Hello, Searched around before posting this but I was unable to find anything useful.
Anyway I am using the rax module to provision a server in the Rackspace Cloud using pyrax etc. The problem is that SOMETIMES the play will fail with a connection refused error.: PLAY [Wait for port 22 to be ready] ******************************************* TASK: [wait_for port=22 delay=20] ********************************************* fatal: [testing6] => {'msg': 'FAILED: [Errno 111] Connection refused', 'failed': True} FATAL: all hosts have already failed -- aborting I tried adding the wait_for with a delay of 20 but maybe I am doing it wrong. Here is what my play looks like up to the point of failure: --- - name: testing rackspace cloud hosts: localhost tasks: - name: Provision the cloud server local_action: module: rax name: "testing" flavor: "performance1-1" image: "centos-65" count: "1" group: "web" wait: yes register: rax - name: Add servers to 'raxhosts' group local_action: module: add_host hostname: "{{ item.name }}" ansible_ssh_host: "{{ item.rax_accessipv4 }}" ansible_ssh_pass: "{{ item.rax_adminpass }}" ansible_ssh_user: root groupname: raxhosts with_items: rax.success when: rax.action == 'create' - name: Wait for port 22 to be ready hosts: raxhosts gather_facts: False tasks: - wait_for: port=22 delay=20 Any help on this is appreciated. The issue is intermittent sometimes it will run 10 times in a row then fail a few time then work again. Thanks! -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/77da0480-8577-4699-961b-a37863ecfb79%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.