Delegate_to will use the same credentials.

I think this would warrant something like "delegate_user:" as a new
keyword.   If anyone wants to have at it, it would likely be accepted.





On Mon, Nov 25, 2013 at 1:05 PM, Joshua Swink <[email protected]>wrote:

> Is there a way to indicate the remote username when using delegate_to? I'm
> trying to use the Nagios plugin, but it tries to log in to the Nagios
> server as the name of the user on the service host. Here's my example
> recipe for shutting down a service:
>
> ---
> - hosts: abc_hosts
>   serial: 1
>   tasks:
>   - name: Disable Nagios alerts
>     nagios: host={{ ansible_ssh_host }} action=silence
>     delegate_to: nagios.myplace.xyz
>   - name: Disable ABC service
>     shell: service ABC stop
>
> If the username on abc_hosts is "abc" and the username on the Nagios
> server is "nagios", the plugin will try to log in to nagios.myplace.xyz as
> "abc". I need it to use user "nagios" here.
>
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Michael DeHaan <[email protected]>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to