What about this?:
https://gist.github.com/infernix/a968f23c4f4e1d6723e4

On Tuesday, April 17, 2018 at 12:47:13 PM UTC-6, ZillaYT wrote:
>
> I've trying to write an Ansible role that upgrades Github. The command to 
> upgrade the server "ghe-upgrade github-2.13.1.pkg" for example, reboots the 
> server, and when that happens, I get, the following connection because my 
> ssh connection drops of course.
>
> TASK [github : Upgrade github1.company.com with version 2.13.1] **********
> fatal: [github1.company.com]: UNREACHABLE! => {"changed": false, "msg": 
> "Failed to connect to the host via ssh: ", "unreachable": true}
>         to retry, use: --limit 
> @/build/workspace/team_SCSCM/github/github-upgrade.retry
>
>
> I tried the ideas from ansible-reboot-and-wait.yml exmaple 
> <https://gist.github.com/infernix/a968f23c4f4e1d6723e4>, and others with 
> similar approach, to no avail. So my tasks look like
>
> # This command will reboot the node
> - name: Upgrade Github host
>   command: "ghe-upgrade {{ pkg_dir }}/{{ pkg_name }} --yes"
>
> (It craps out after above task)
>
> # Now we will run a local 'ansible -m ping' on this host until it returns.
> # This works with the existing ansible hosts inventory and so any custom 
> ansible_ssh_hosts definitions are being used
> - local_action: shell ansible -u {{ ansible_ssh_user }} -m ping 
> github1.company.com
>   register: result
>   until: result.rc == 0
>   retries: 30
>   delay: 10
>
>
> Any pointers on how I can make this work? 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/73d60dd4-4439-4ff1-a164-b37a935af906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to