mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-07 06:34:23 -07:00
Give example of empty _meta in dyanmic inventory (#24085)
This commit is contained in:
parent
df2fcecd62
commit
89c3151167
1 changed files with 12 additions and 0 deletions
|
@ -86,6 +86,18 @@ The data to be added to the top level JSON dictionary looks like this::
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
To satisfy the requirements of using ``_meta``, to prevent ansible from calling your inventory with ``--host`` you must at least populate ``_meta`` with an empty ``hostvars`` dictionary, such as::
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
# results of inventory script as above go here
|
||||||
|
# ...
|
||||||
|
|
||||||
|
"_meta": {
|
||||||
|
"hostvars": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
:doc:`developing_api`
|
:doc:`developing_api`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue