mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
fix rst + docs rebuild
This commit is contained in:
parent
f81000c127
commit
85cedf52ef
14 changed files with 143 additions and 67 deletions
8
api.html
8
api.html
|
@ -268,7 +268,7 @@ of these options via an external inventory system.</p>
|
|||
<p>If you are familiar with Puppet terminology, this concept is basically the same as ‘external nodes’, with the slight difference that it also defines which hosts are managed.</p>
|
||||
<div class="section" id="script-conventions">
|
||||
<h3>Script Conventions<a class="headerlink" href="#script-conventions" title="Permalink to this headline">¶</a></h3>
|
||||
<p>When the external node script is called with no arguments, the script must return a JSON hash/dictionary of all the groups to be managed, with a list of each host/IP as the value for each hash/dictionary element, like so:</p>
|
||||
<p>When the external node script is called with the single argument ‘–list’, the script must return a JSON hash/dictionary of all the groups to be managed, with a list of each host/IP as the value for each hash/dictionary element, like so:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
|
||||
<span class="s">'databases'</span> <span class="p">:</span> <span class="p">[</span> <span class="s">'host1.example.com'</span><span class="p">,</span> <span class="s">'host2.example.com'</span> <span class="p">],</span>
|
||||
<span class="s">'webservers'</span> <span class="p">:</span> <span class="p">[</span> <span class="s">'host2.example.com'</span><span class="p">,</span> <span class="s">'host3.example.com'</span> <span class="p">],</span>
|
||||
|
@ -276,8 +276,8 @@ of these options via an external inventory system.</p>
|
|||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>When called with a single argument, the name of a host from above, the script must return either an empty JSON
|
||||
hash/dictionary, or a list of key/value variables to make available to templates. Returning variables is optional,
|
||||
<p>When called with the arguments ‘–host <hostname>’ (where <hostname> is a host from above), the script must return either an empty JSON
|
||||
hash/dictionary, or a list of key/value variables to make available to templates or playbooks. Returning variables is optional,
|
||||
if the script does not wish to do this, returning an empty hash/dictionary is the way to go:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
|
||||
<span class="s">'favcolor'</span> <span class="p">:</span> <span class="s">'red'</span><span class="p">,</span>
|
||||
|
@ -357,7 +357,7 @@ a conf.d file appropriately or something similar. Who knows?</p>
|
|||
</p>
|
||||
<p>
|
||||
© Copyright 2012 Michael DeHaan.<br/>
|
||||
Last updated on May 06, 2012.<br/>
|
||||
Last updated on May 10, 2012.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue