mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-24 17:01:49 -05:00
Add refresh_inventory flag for job_template callback to refresh inventory before trying to find a matching host.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
The job template callback allows for empheral hosts to launch a new job.
|
||||
The job template callback allows for ephemeral hosts to launch a new job.
|
||||
|
||||
Configure a host to POST to this resource, passing the `host_config_key`
|
||||
parameter, to start a new job limited to only the requesting host. In the
|
||||
@@ -18,6 +18,17 @@ The response will return status 202 if the request is valid, 403 for an
|
||||
invalid host config key, or 400 if the host cannot be determined from the
|
||||
address making the request.
|
||||
|
||||
_(New in Ansible Tower 2.0.0)_ By default, the host must already be present in
|
||||
inventory for the callback to succeed. The `refresh_inventory` parameter can
|
||||
be passed to the callback to trigger an inventory sync prior to searching for
|
||||
the host and running the job. The associated inventory must have the
|
||||
`update_on_launch` flag set and will only refresh if the `update_cache_timeout`
|
||||
has expired.
|
||||
|
||||
For example, using curl:
|
||||
|
||||
curl --data-urlencode "host_config_key=HOST_CONFIG_KEY&refresh_inventory=1" http://server/api/v1/job_templates/N/callback/
|
||||
|
||||
A GET request may be used to verify that the correct host will be selected.
|
||||
This request must authenticate as a valid user with permission to edit the
|
||||
job template. For example:
|
||||
|
||||
Reference in New Issue
Block a user