@ -123,7 +123,7 @@ from the :ref:`host list <host_list_inventory>` plugin:
valid = True
return valid
This method is just to expedite the inventory process and avoid uneccessary parsing of sources that are easy to filter out before causing a parse error.
This method is just to expedite the inventory process and avoid unnecessary parsing of sources that are easy to filter out before causing a parse error.
.._inventory_plugin_parse:
@ -132,7 +132,7 @@ parse
This method does the bulk of the work in the plugin.
It takes the following paramters:
It takes the following parameters:
* inventory: inventory object with existing data and the methods to add hosts/groups/variables to inventory
* loader: Ansible's DataLoader. The DataLoader can read files, auto load JSON/YAML and decrypt vaulted data, and cache read files.
@ -168,7 +168,7 @@ To facilitate this there are a few of helper functions used in the example below
# if NOT using _read_config_data you should call set_options directly,
# to process any defined configuration for this plugin,
# if you dont define any options you can skip
# if you don't define any options you can skip
#self.set_options()
# example consuming options from inventory source
@ -178,14 +178,14 @@ To facilitate this there are a few of helper functions used in the example below
)
# make requests to get data to feed into inventorya
mydata = myselss.getitall()
# make requests to get data to feed into inventory
The specifics will vary depending on API and structure returned. But one thing to keep in mind, if the inventory source or any other issue crops up you should ``raise AnsibleParserError`` to let Ansible know that the source was invalid or the process failed.