Handling Retries

184 views
Skip to first unread message

Tennis Smith

unread,
Jan 4, 2016, 3:24:00 PM1/4/16
to Ansible Project


Like many, I'm having problems figuring out how to handle situations where one endpoint out of several fails when running a playbook.


One obvious approach is to create logic in my calling scripts (mostly bash) which will call a playbook until one of 2 things happen:

1 - No '<playbook_name>.retry' files are found. That is, everything is successful

*or*

2 - Some number of attempts to run the playbook retries is exceeded.


Are there better options?  And, would 2.0 negate the need to do this with the changes to ssh retries?


Thanks,

-T


Matt Martz

unread,
Jan 4, 2016, 3:29:16 PM1/4/16
to ansible...@googlegroups.com
Ansible 2.0 contains a configuration for the ssh connection plugin called:

ANSIBLE_SSH_RETRIES as an environment variable

or simply `retries` under `[ssh_connection]` in your ansible.cfg file.

The default is 0, which means no retries, which is effectively 1.x behavior.  You can increase that number to get more retries.

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/08132c15-754a-4532-b89a-9da439bd1705%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net
Reply all
Reply to author
Forward
0 new messages