mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
rebuild
This commit is contained in:
parent
2befb446a3
commit
b721176bdd
6 changed files with 131 additions and 72 deletions
10
api.html
10
api.html
|
@ -317,9 +317,13 @@ Welcome, I am templated with a value of a={{ a }}, b={{ b }}, and c={{ c }}</pre
|
|||
<div class="highlight-python"><pre>ansible webserver -m setup
|
||||
ansible webserver -m template -a "src=/tmp/motd.j2 dest=/etc/motd"</pre>
|
||||
</div>
|
||||
<p>Note that the name ‘webserver’ came from cobbler, as did the variables for the config file. You can still
|
||||
pass in your own variables like normal in Ansible, but variables from the external inventory script will
|
||||
override any that have the same name.</p>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">The name ‘webserver’ came from cobbler, as did the variables for
|
||||
the config file. You can still pass in your own variables like
|
||||
normal in Ansible, but variables from the external inventory script
|
||||
will override any that have the same name.</p>
|
||||
</div>
|
||||
<p>So, with the template above (motd.j2), this would result in the following data being written to /etc/motd for system ‘foo’:</p>
|
||||
<div class="highlight-python"><pre>Welcome, I am templated with a value of a=2, b=3, and c=4</pre>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue