I am trying to use the route53 module in a playbook.
If i install boto and add credentials the play works (reading a record and registering it), however I want to know if I can do this locally (where boto is installed) and have that registered variable available on remote hosts.
I don't think I'm parsing what you are saying correctly. I thought you
were running the task that required boto locally.
ansible_python_interpreter is what you use to direct ansible to the
correct python with the correct dependencies, it only applies for
those hosts for which you set it.
I am trying to run the route53 module locally, register its output and use that variable in a task for a remote host.
This works if i have boto installed globally, using connection: local. It does not work when using inside a virtualenv.
I reproduced this in a virtual machine with boto available globally, and it works. On my mac laptop, I am using boto/ansible inside a virtualenv and this is where boto can not be found for a remote host.
On my local machine, when running on a localhost (with python_interpreter set), it does work and boto is found, however the variable isn’t available on the remote host.
Setting the interpreter for the remote host would require boto being installed on the remote host, which isn’t what I’m after.
Setting the variable on localhost and accessing it remotely using hostvars does work, however, the real issue is how ansible can’t seem to find boto when its run inside a virtualenv for a remote host task.