mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 01:33:09 +00:00
@@ -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>
|
||||
@@ -348,4 +348,4 @@ a simplified syntax for this.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -86,7 +86,7 @@ simpler::
|
||||
|
||||
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::
|
||||
from those programs can be accessed too, using the appropriate prefix::
|
||||
|
||||
This is an Ansible variable: {{ favcolor }}
|
||||
This is a facter variable: {{ facter_hostname }}
|
||||
|
||||
Reference in New Issue
Block a user