connection caching throughout a play

14 views
Skip to first unread message

Michael Ströder

unread,
Mar 29, 2019, 5:27:31 PM3/29/19
to Ansible Project
HI!

On the ansible controller I'd like to establish an authenticated LDAP
connection at the beginning of a playbook run and use this afterwards in
several tasks.

Up to now the ansible modules I reviewed seem to re-open all kinds of
backend connections all the time using long-term credentials. Which
means I cannot use 2-factor-auth with an OTP.
(No, using Kerberos is not an option.)

So I wonder whether it's possible to cache a connection object and
re-use it in subsequent tasks. Any framework for something like this?

Ciao, Michael.

Brian Coca

unread,
Apr 3, 2019, 4:42:08 PM4/3/19
to Ansible Project
Currently there is no way to do this, but it is something we have been
thinking about for a while now as a feature.

Just don't expect it anytime soon, as it is a complex ask, specially
if you consider modules are not guaranteed to execute on the same
machine.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages