FYI, opened an issue <https://github.com/ansible/ansible/issues/12714>.

On Friday, October 2, 2015 at 12:08:56 PM UTC+3, Roman Belyakovsky wrote:
>
> Hello!
>
> Let's say I have a simple dictionary in host_vars or group_vars:
> host_presets:
>  hostname: "{{ inventory_hostname.split('.')[0] }}
>  domain: "{{ inventory_hostname| regex_replace('^' + inventory_hostname.
> split('.')[0] + '\\.', '')}}" 
>
> It works perfectly till I try to get it for other host with 
> hostvars['myvm'].host_presets.hostname. In this case I get the hostname 
> of the server that runs a playbook.
>
> Is there a working way for dynamic predefining this kind of host/group 
> vars?
>
> Regards,
> Roman
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/45676d45-04cf-4dd8-b016-ba0ce1aa15c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to