mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-31 17:11:23 -07:00
Update developing_api.rst to use correct inventory format for single explicit host (#34919)
Fix for #34918
This commit is contained in:
parent
576335e53d
commit
59042d79f5
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,8 @@ In 2.0 things get a bit more complicated to start, but you end up with much more
|
||||||
results_callback = ResultCallback()
|
results_callback = ResultCallback()
|
||||||
|
|
||||||
# create inventory and pass to var manager
|
# create inventory and pass to var manager
|
||||||
inventory = InventoryManager(loader=loader, sources=['localhost'])
|
# use path to host config file as source or hosts in a comma separated string
|
||||||
|
inventory = InventoryManager(loader=loader, sources='localhost,')
|
||||||
variable_manager = VariableManager(loader=loader, inventory=inventory)
|
variable_manager = VariableManager(loader=loader, inventory=inventory)
|
||||||
|
|
||||||
# create play with tasks
|
# create play with tasks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue