mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
Merge pull request #2911 from AlanCoding/mo_text
Document inventory script towervars
This commit is contained in:
@@ -54,8 +54,6 @@ within all designated text fields of a model.
|
|||||||
|
|
||||||
?search=findme
|
?search=findme
|
||||||
|
|
||||||
_Added in AWX 1.4_
|
|
||||||
|
|
||||||
(_Added in Ansible Tower 3.1.0_) Search across related fields:
|
(_Added in Ansible Tower 3.1.0_) Search across related fields:
|
||||||
|
|
||||||
?related__search=findme
|
?related__search=findme
|
||||||
@@ -84,7 +82,7 @@ To exclude results matching certain criteria, prefix the field parameter with
|
|||||||
|
|
||||||
?not__field=value
|
?not__field=value
|
||||||
|
|
||||||
(_Added in AWX 1.4_) By default, all query string filters are AND'ed together, so
|
By default, all query string filters are AND'ed together, so
|
||||||
only the results matching *all* filters will be returned. To combine results
|
only the results matching *all* filters will be returned. To combine results
|
||||||
matching *any* one of multiple criteria, prefix each query string parameter
|
matching *any* one of multiple criteria, prefix each query string parameter
|
||||||
with `or__`:
|
with `or__`:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ object containing groups, including the hosts, children and variables for each
|
|||||||
group. The response data is equivalent to that returned by passing the
|
group. The response data is equivalent to that returned by passing the
|
||||||
`--list` argument to an inventory script.
|
`--list` argument to an inventory script.
|
||||||
|
|
||||||
_(Added in AWX 1.3)_ Specify a query string of `?hostvars=1` to retrieve the JSON
|
Specify a query string of `?hostvars=1` to retrieve the JSON
|
||||||
object above including all host variables. The `['_meta']['hostvars']` object
|
object above including all host variables. The `['_meta']['hostvars']` object
|
||||||
in the response contains an entry for each host with its variables. This
|
in the response contains an entry for each host with its variables. This
|
||||||
response format can be used with Ansible 1.3 and later to avoid making a
|
response format can be used with Ansible 1.3 and later to avoid making a
|
||||||
@@ -18,11 +18,16 @@ separate API request for each host. Refer to
|
|||||||
[Tuning the External Inventory Script](http://docs.ansible.com/developing_inventory.html#tuning-the-external-inventory-script)
|
[Tuning the External Inventory Script](http://docs.ansible.com/developing_inventory.html#tuning-the-external-inventory-script)
|
||||||
for more information on this feature.
|
for more information on this feature.
|
||||||
|
|
||||||
_(Added in AWX 1.4)_ By default, the inventory script will only return hosts that
|
By default, the inventory script will only return hosts that
|
||||||
are enabled in the inventory. This feature allows disabled hosts to be skipped
|
are enabled in the inventory. This feature allows disabled hosts to be skipped
|
||||||
when running jobs without removing them from the inventory. Specify a query
|
when running jobs without removing them from the inventory. Specify a query
|
||||||
string of `?all=1` to return all hosts, including disabled ones.
|
string of `?all=1` to return all hosts, including disabled ones.
|
||||||
|
|
||||||
|
Specify a query string of `?towervars=1` to add variables
|
||||||
|
to the hostvars of each host that specifies its enabled state and database ID.
|
||||||
|
|
||||||
|
To apply multiple query strings, join them with the `&` character, like `?hostvars=1&all=1`.
|
||||||
|
|
||||||
## Host Response
|
## Host Response
|
||||||
|
|
||||||
Make a GET request to this resource with a query string similar to
|
Make a GET request to this resource with a query string similar to
|
||||||
|
|||||||
Reference in New Issue
Block a user