Corrects minor typos in the documentation (#49668)

Signed-off-by: Phuurl <chubble.10@icloud.com>
pull/49674/head
Phuurl 6 years ago committed by Alicia Cozine
parent 9007dbec2f
commit 29c96d20fb

@ -28,21 +28,21 @@ Inventory sources are strings (i.e what you pass to ``-i`` in the command line),
they can represent a path to a file/script or just be the raw data for the plugin to use.
Here are some plugins and the type of source they use:
+--------------------------------------------+--------------------------------------+
| Plugin | Source |
+--------------------------------------------+--------------------------------------+
| :ref:`host list <host_list_inventory>` | A comma separated list of hosts |
+--------------------------------------------+--------------------------------------+
| :ref:`yaml <yaml_inventory>` | Path to a YAML format data file |
+--------------------------------------------+--------------------------------------+
| :ref:`constructed <constructed_inventory>` | Path to a YAML configuration file |
+--------------------------------------------+--------------------------------------+
| :ref:`ini <ini_inventory>` | Path to An ini formated data file |
+--------------------------------------------+--------------------------------------+
| :ref:`virtualbox <virtualbox_inventory>` | Path to a YAML configuration file |
+--------------------------------------------+--------------------------------------+
| :ref:`script plugin <script_inventory>` | Path to an executable outputing JSON |
+--------------------------------------------+--------------------------------------+
+--------------------------------------------+---------------------------------------+
| Plugin | Source |
+--------------------------------------------+---------------------------------------+
| :ref:`host list <host_list_inventory>` | A comma separated list of hosts |
+--------------------------------------------+---------------------------------------+
| :ref:`yaml <yaml_inventory>` | Path to a YAML format data file |
+--------------------------------------------+---------------------------------------+
| :ref:`constructed <constructed_inventory>` | Path to a YAML configuration file |
+--------------------------------------------+---------------------------------------+
| :ref:`ini <ini_inventory>` | Path to an INI formatted data file |
+--------------------------------------------+---------------------------------------+
| :ref:`virtualbox <virtualbox_inventory>` | Path to a YAML configuration file |
+--------------------------------------------+---------------------------------------+
| :ref:`script plugin <script_inventory>` | Path to an executable outputting JSON |
+--------------------------------------------+---------------------------------------+
.. _developing_inventory_inventory_plugins:
@ -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
mydata = mysession.getitall()
#parse data and create inventory objects:
for colo in mydata:
for server in mydata[colo]['servers']:
self.inventory.add_host(server['name'])
self.inventory.set_varaible('ansible_host', server['external_ip'])
self.inventory.set_variable('ansible_host', server['external_ip'])
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.

@ -76,7 +76,7 @@ with integration tests, such as:
failures and exceptions
* Extensive testing of slow configuration APIs
* Situations where the integration tests cannot be run as part of the main Ansible
continuous integraiton running in Shippable.
continuous integration running in Shippable.
@ -110,7 +110,7 @@ Example:
Another related use is in the situation where an API has versions which behave
differently. A programmer working on a new version may change the module to work with the
new API version and unintentially break the old version. A test case
new API version and unintentionally break the old version. A test case
which checks that the call happens properly for the old version can help avoid the
problem. In this situation it is very important to include version numbering in the test case
name (see `Naming unit tests`_ below).

@ -351,7 +351,7 @@ the user token, it will continue to use the limited token during execution.
A user must have the ``SeDebugPrivilege`` to run a become process with elevated
privileges. This privilege is assigned to Administrators by default. If the
debug privilege is not available, the become process will run with a limmited
debug privilege is not available, the become process will run with a limited
set of privileges and groups.
To determine the type of token that Ansible was able to get, run the following

Loading…
Cancel
Save