Closed mikeshng closed 4 years ago
As per the awx.awx.tower_job_launch
documentation the data type of the extra_vars
being passed in should be a dict
. This differs from what the Ansible command line tool expects because we're targeting the AWX/Tower REST API for job launching on the backend of the task that calls the awx.awx.tower_job_launch
module instead of Ansible the command line tool.
extra_vars:
description:
- extra_vars to use for the Job Template.
- ask_extra_vars needs to be set to True via tower_job_template module
when creating the Job Template.
type: dict
EDIT: out of date comment. extra_vars
is now object type.
@maxamillion thanks for the good catch. But there is no dict
or even a map
type that I can define easily in the CRD. The list of options are:
Unsupported value: "dict": supported values: "array", "boolean", "integer", "number", "object", "string"
For ease of use, I think we should stick with the JSON string. I've updated the description for the field in the CRD. What do you think?
Signed-off-by: Mike Ng ming@redhat.com
*edited after discussion in comments.
inventory
to string type.extra_vars
to be object type to best mimic pythondict
data type.inventory
and/orextra_vars
to launch tower job.An AnsibleJob CR example with
extra_vars
: