summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDivided by Zer0 <mail@dbzer0.com>2019-02-22 21:57:35 +0100
committerAlicia Cozine <879121+acozine@users.noreply.github.com>2019-02-22 14:57:35 -0600
commit1f06b3ca7d701719b81abb1c8fe258a403b7d8dc (patch)
tree1f7bd72fa8ce75d5c29ac0eebd4fb059de8ec909 /docs
parentdf3b973cec8481f51a3935fcbaacf883cb9270d2 (diff)
downloadansible-1f06b3ca7d701719b81abb1c8fe258a403b7d8dc.tar.gz
ungrouped as a list (#50593)
* update the developing_inventory docs to show ungrouped as a dict with a "children" key; avoid [WARNING]: Found both group and host with same name: ungrouped
Diffstat (limited to 'docs')
-rw-r--r--docs/docsite/rst/dev_guide/developing_inventory.rst31
1 files changed, 18 insertions, 13 deletions
diff --git a/docs/docsite/rst/dev_guide/developing_inventory.rst b/docs/docsite/rst/dev_guide/developing_inventory.rst
index b212039cd4..3b62bbed9c 100644
--- a/docs/docsite/rst/dev_guide/developing_inventory.rst
+++ b/docs/docsite/rst/dev_guide/developing_inventory.rst
@@ -318,19 +318,24 @@ If you intend to replace an existing static inventory file with an inventory scr
it must return a JSON object which contains an 'all' group that includes every
host in the inventory as a member and every group in the inventory as a child.
It should also include an 'ungrouped' group which contains all hosts which are not members of any other group.
-A skeleton example of this JSON object is::
-
- {
- "_meta": {
- "hostvars": {}
- },
- "all": {
- "children": [
- "ungrouped"
- ]
- },
- "ungrouped": {}
- }
+A skeleton example of this JSON object is:
+
+.. code-block:: json
+
+ {
+ "_meta": {
+ "hostvars": {}
+ },
+ "all": {
+ "children": [
+ "ungrouped"
+ ]
+ },
+ "ungrouped": {
+ "children": [
+ ]
+ }
+ }
An easy way to see how this should look is using :ref:`ansible-inventory`, which also supports ``--list`` and ``--host`` parameters like an inventory script would.