Can I forward env variables over ssh?

You can, but it requires changing the server configuration. Read the entries for AcceptEnv in sshd_config(5) and SendEnv in ssh_config(5). update: You can also pass them on the command line: ssh foo@host “FOO=foo BAR=bar doz” Regarding security, note than anybody with access to the remote machine will be able to see the environment variables passed … Read more

Ansible SSH ERROR connection in localhost

Ansible by default tries to connect through ssh. For localhost you should set the connection to local. You can define this when calling the playbook: ansible-playbook playbook.yml –connection=local Define it in your playbook: – hosts: local connection: local Or, preferable, define it as a host var just for localhost/127.0.0.1. Create a file host_vars/127.0.0.1 relative to … Read more