<div dir="ltr">Hi Tsadik,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 23, 2017 at 12:17 PM, Tasdik Rahman <span dir="ltr">&lt;<a href="mailto:prodicus@outlook.com" target="_blank">prodicus@outlook.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
<div><span style="font-family:Consolas,&quot;Lucida Console&quot;,monospace;font-size:12.8px;font-variant-ligatures:normal;background-color:rgb(240,247,255)">Hello,</span></div>
<span style="font-family:Consolas,&quot;Lucida Console&quot;,monospace;font-size:12.8px;font-variant-ligatures:normal;background-color:rgb(240,247,255)">
<div><span style="font-family:Consolas,&quot;Lucida Console&quot;,monospace;font-size:12.8px;font-variant-ligatures:normal;background-color:rgb(240,247,255)"><br>
</span></div>
 I was having a look at the ansible playbooks to autmate the installation of ovirt-engine on a remote host here at </span><a href="https://github.com/rhevm-qe-automation/ovirt-ansible/" style="font-family:Consolas,&quot;Lucida Console&quot;,monospace;font-size:12.8px;font-variant-ligatures:normal;background-color:rgb(240,247,255)" target="_blank">https://github.com/rhevm-<wbr>qe-automation/ovirt-ansible/</a><span style="font-family:Consolas,&quot;Lucida Console&quot;,monospace;font-size:12.8px;font-variant-ligatures:normal;background-color:rgb(240,247,255)"> <wbr>specifically
 the role engine-setup. I was curious where this jinja variable {{ansible_fqdn}} gets set.</span><span style="font-family:Consolas,&quot;Lucida Console&quot;,monospace;font-size:12.8px;font-variant-ligatures:normal;background-color:rgb(240,247,255)">  </span><span style="font-family:Consolas,&quot;Lucida Console&quot;,monospace;font-size:12.8px;font-variant-ligatures:normal;background-color:rgb(240,247,255)">I
 could not see it being assigned in the playbooks. Or do we set it during the playbook execution as a command line arg?</span>
<div>
<div><font face="Consolas, Lucida Console, monospace"><span style="font-size:12.8px;background-color:rgb(240,247,255)"><br></span></font></div></div></div></blockquote><div><br></div><div><span style="font-family:monospace,monospace">The ansible_fqdn is taken from ansible facts. You can evaluate it on the target host by running (replace </span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">target_host_name</span></span> with the proper host name or localhost for testing only):<br>ansible </span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">target_host_name</span> -m setup -a &#39;filter=ansible_fqdn&#39;<br><br></span></div><div><span style="font-family:monospace,monospace">You can read more about jinga filters by facts here:<br><a href="http://docs.ansible.com/ansible/playbooks_variables.html#jinja2-filters">http://docs.ansible.com/ansible/playbooks_variables.html#jinja2-filters</a><br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">Also, you can read more about fact/variables precedence here:<br><a href="http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable">http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable</a><br></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><div><font face="Consolas, Lucida Console, monospace"><span style="font-size:12.8px;background-color:rgb(240,247,255)">
</span></font></div>
<div><font face="Consolas, Lucida Console, monospace"><span style="font-size:12.8px;background-color:rgb(240,247,255)">Relevant search </span></font><a href="https://github.com/rhevm-qe-automation/ovirt-ansible/search?utf8=%E2%9C%93&amp;q=ansible_fqdn&amp;type=" target="_blank">https://github.com/<wbr>rhevm-qe-automation/ovirt-<wbr>ansible/search?utf8=%E2%9C%93&amp;<wbr>q=ansible_fqdn&amp;type=</a></div>
<div>
<div><font face="Consolas, Lucida Console, monospace"><span style="font-size:12.8px;background-color:rgb(240,247,255)"><br>
</span></font></div>
<div><font face="Consolas, Lucida Console, monospace"><span style="font-size:12.8px;background-color:rgb(240,247,255)"><br>
</span></font></div>
<div>
<div><font face="Consolas, Lucida Console, monospace"><span style="font-size:12.8px;background-color:rgb(240,247,255)"><br>
</span></font></div>
<div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
Regards, </div><span class="gmail-HOEnZb"><font color="#888888">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
Tasdik Rahman</div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<a href="http://tasdikrahman.me/" target="_blank">http://tasdikrahman.me/</a></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br>
</div>
<br class="gmail-m_3592807859517583868Apple-interchange-newline">
</font></span></div>
<br>
</div>
</div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Regards,<br></div>Moti<br></div></div>
</div></div></div>