|
|
|
@ -226,7 +226,7 @@ ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"</pre>
|
|
|
|
|
</div>
|
|
|
|
|
<p>Ansible variables are used in templates by using the name surrounded by double
|
|
|
|
|
curly-braces. If facter or ohai were installed on the remote machine, variables
|
|
|
|
|
from those programs can be accessed too, which the appropriate prefix:</p>
|
|
|
|
|
from those programs can be accessed too, using the appropriate prefix:</p>
|
|
|
|
|
<div class="highlight-python"><pre>This is an Ansible variable: {{ favcolor }}
|
|
|
|
|
This is a facter variable: {{ facter_hostname }}
|
|
|
|
|
This is an ohai variable: {{ ohai_foo }}</pre>
|
|
|
|
|