Source environment file on connection

12 views
Skip to first unread message

Richard Shaw

unread,
Dec 24, 2017, 5:35:14 AM12/24/17
to Ansible Project
Hi,

I'm working with a environment that requires a $ source /path/environment file every time Ansible connects so it can find Python etc, how would I go about doing that?

Thanks,
Richard

J Hawkesworth

unread,
Dec 24, 2017, 8:33:57 AM12/24/17
to Ansible Project
I would log in to a representative machine, do the source command and then examine what environment variables have been set, and then configure environment for any commands that need it.
See http://docs.ansible.com/ansible/latest/playbooks_environment.html

Jon

Reply all
Reply to author
Forward
0 new messages