yes you can use hostvars, hostvars[host]['ansible_ssh_host'] replacing host 
with the host you want to get in info on.

also ansible_ssh_host is available as a variable for the current play host, 
you can simply do {{ ansible_ssh_host }}

On Friday, August 8, 2014 9:14:39 AM UTC+2, Stefan Lapers wrote:
>
> Hi,
>
> Is it possible to access ansible_ssh_host (and other inventory 
> parameters) in a playbook ?
> The goal is to copy/backup files *from* a remote machine to the local 
> ansible station or a machine specified with delegate_to using rsync over 
> ssh. So i would need to expand the ssh connection info in the command.
>
> Or is an action plugin the only way to make this kind of functionality 
> possible ?
>
> Thanks,
> Stefan
>

-- 
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/06f7f62d-9103-462c-9219-06967832942b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to