remote_user is ignored on local connections, ansible will always run with the user that ran ansible (unless you use sudo).
On Mon, Jun 8, 2015 at 12:57 PM, Nekmo com <[email protected]> wrote: > I want to copy a directory from local (usign nekmo user) to a remote server > (usign xxxxx_ssh user). I have the following: > > - hosts: vhome > remote_user: xxxxxx_ssh > tasks: > - name: Rsync > synchronize: dest=/home/webs/DOCS/django src={{ project_path > }}/docs/_build/html > > This works remotely but not locally: > > GATHERING FACTS > *************************************************************** > <vhome.xxxxx.es> ESTABLISH CONNECTION FOR USER: xxxxx_ssh > <vhome.xxxxx.es> REMOTE_MODULE setup > > ok: [vhome.xxxxx.es] > > TASK: [Rsync] > ***************************************************************** > <127.0.0.1> ESTABLISH CONNECTION FOR USER: xxxxx_ssh > [....] > Permission denied (publickey,password). > > The local user must be "nekmo". If I do not put "remote_user" param this > does not work remotely (this use "nekmo" as remote user). > > I need to set the local user, or afford to ignore the parameter > "remote_user" for localhost. > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/b46838dd-d283-4707-b80f-de98bf66e799%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Brian Coca -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mMyKp7O7fSy_qaU5rhZESX4obtwVv4uz4a2jyocDQ1%2BQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
