[ovirt-devel] [rhevm-qe-automation/ovirt-ansible] Question on where does the jinja2 var {{ ansible_fqdn }} get set

Moti Asayag masayag at redhat.com
Wed May 24 09:53:45 UTC 2017


Hi Tsadik,

On Tue, May 23, 2017 at 12:17 PM, Tasdik Rahman <prodicus at outlook.com>
wrote:

> Hello,
>
>  I was having a look at the ansible playbooks to autmate the installation
> of ovirt-engine on a remote host here at https://github.com/rhevm-
> qe-automation/ovirt-ansible/ specifically the role engine-setup. I was
> curious where this jinja variable {{ansible_fqdn}} gets set.  I could not
> see it being assigned in the playbooks. Or do we set it during the playbook
> execution as a command line arg?
>
>
The ansible_fqdn is taken from ansible facts. You can evaluate it on the
target host by running (replace target_host_name with the proper host name
or localhost for testing only):
ansible target_host_name -m setup -a 'filter=ansible_fqdn'

You can read more about jinga filters by facts here:
http://docs.ansible.com/ansible/playbooks_variables.html#jinja2-filters

Also, you can read more about fact/variables precedence here:
http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable


> Relevant search https://github.com/rhevm-qe-automation/ovirt-
> ansible/search?utf8=%E2%9C%93&q=ansible_fqdn&type=
>
>
>
> Regards,
> Tasdik Rahman
> http://tasdikrahman.me/
>
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>



-- 
Regards,
Moti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20170524/4854ff16/attachment.html>


More information about the Devel mailing list