From fc7bb858e48205e3f17ea57959a9f55784d228fe Mon Sep 17 00:00:00 2001 From: Matt Coddington Date: Fri, 11 May 2012 17:20:25 -0400 Subject: [PATCH] Clarifications/fixes for executable inventory examples --- rst/api.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rst/api.rst b/rst/api.rst index 4fdbaa4642..7ee739d544 100644 --- a/rst/api.rst +++ b/rst/api.rst @@ -97,7 +97,7 @@ If you are familiar with Puppet terminology, this concept is basically the same Script Conventions `````````````````` -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:: +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:: { 'databases' : [ 'host1.example.com', 'host2.example.com' ], @@ -105,8 +105,8 @@ When the external node script is called with no arguments, the script must retur 'atlanta' : [ 'host1.example.com', 'host4.example.com', 'host5.example.com' ] } -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, +When called with the arguments '--host ' (where 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:: {