awx
awx copied to clipboard
All of the flags for awx job_templates modify are missing in CentOS 7.x/Fedora 36
ISSUE TYPE
- Bug, Docs Fix or other nominal change
COMPONENT NAME
- CLI
SUMMARY
All of the flags for awx job_templates modify are missing and the function itself doesn't appear to do anything when executed on CentOS 7.x or Fedora 36.
ENVIRONMENT
- AWX version: 3.8.6
- AWX install method: pip
- Operating System: Linux (CentOS 7.9 and Fedora 36)
- Web Browser: N/A
STEPS TO REPRODUCE
Install the binary with pip (pip3 install awxkit) on a CentOS 7.9 or Fedora 36 host and execute awx job_templates modify jobid or use any of the flags associated with it.
The following output is from my laptop, which runs Fedora 36, I get the same output from CentOS 7.9 boxes as well.
[brando56894@r911vm89 ~]$ awx --version
3.8.6
[brando56894@r911vm89 ~]$ awx job_templates modify 758
usage: awx job_templates modify [-h] id
positional arguments:
id the ID (or unique name) of the resource
options:
-h, --help show this help message and exit
awx job_templates modify: the following arguments are required: id
[brando56894@r911vm89 ~]$ awx job_templates modify 758 --extra_vars "foo:bar"
usage: awx job_templates modify [-h] id
positional arguments:
id the ID (or unique name) of the resource
options:
-h, --help show this help message and exit
[brando56894@r911vm89 ~]$ awx job_templates modify 758 --extra_vars "@vars.yml"
usage: awx job_templates modify [-h] id
positional arguments:
id the ID (or unique name) of the resource
options:
-h, --help show this help message and exit
[bgolway@r911vm89 ~]$ awx job_templates modify Foreman-CentOS-Baseline-Apply --extra_vars "@vars.yml"
usage: awx job_templates modify [-h] id
positional arguments:
id the ID (or unique name) of the resource
options:
-h, --help show this help message and exit
EXPECTED RESULTS
The help command should list all the flags/options that are listed here
The modify action should allow the user to modify the template
ACTUAL RESULTS
awx job_templates modify seems to do nothing other than print the help text instructing the user how to use the action
ADDITIONAL INFORMATION
Installing the aforementioned ansible-tower-cli-3.8.5-3.el8at.x86_64.rpm on a Rocky 8.5 VM or installing awxkit via pip works as expected after giving the job ID
[[email protected] ~]$ awx --version
3.8.5
[[email protected] ~]$ awx job_templates modify 753
usage: awx job_templates modify [-h] [--name TEXT] [--description TEXT]
[--job_type {run,check}] [--inventory ID]
[--project ID] [--playbook TEXT]
[--scm_branch TEXT] [--forks INTEGER]
[--limit TEXT] [--verbosity {0,1,2,3,4,5}]
[--extra_vars JSON/YAML] [--job_tags TEXT]
[--force_handlers BOOLEAN] [--skip_tags TEXT]
[--start_at_task TEXT] [--timeout INTEGER]
[--use_fact_cache BOOLEAN]
[--host_config_key TEXT]
[--ask_scm_branch_on_launch BOOLEAN]
[--ask_diff_mode_on_launch BOOLEAN]
[--ask_variables_on_launch BOOLEAN]
[--ask_limit_on_launch BOOLEAN]
[--ask_tags_on_launch BOOLEAN]
[--ask_skip_tags_on_launch BOOLEAN]
[--ask_job_type_on_launch BOOLEAN]
[--ask_verbosity_on_launch BOOLEAN]
[--ask_inventory_on_launch BOOLEAN]
[--ask_credential_on_launch BOOLEAN]
[--survey_enabled BOOLEAN]
[--become_enabled BOOLEAN]
[--diff_mode BOOLEAN]
[--allow_simultaneous BOOLEAN]
[--custom_virtualenv TEXT]
[--job_slice_count INTEGER]
[--webhook_service {,github,gitlab}]
[--webhook_credential ID]
id
positional arguments:
id the ID (or unique name) of the resource
optional arguments:
-h, --help show this help message and exit
--name TEXT Name of this job template.
--description TEXT Optional description of this job template.
--job_type {run,check}
--inventory ID the ID of the associated inventory
--project ID the ID of the associated project
--playbook TEXT
--scm_branch TEXT Branch to use in job run. Project default used if
blank. Only allowed if project allow_override field is
set to true.
--forks INTEGER
--limit TEXT
--verbosity {0,1,2,3,4,5}
--extra_vars JSON/YAML
a JSON or YAML string. You can optionally specify a
file path e.g., @path/to/file.yml
--job_tags TEXT
--force_handlers BOOLEAN
--skip_tags TEXT
--start_at_task TEXT
--timeout INTEGER The amount of time (in seconds) to run before the task
is canceled.
--use_fact_cache BOOLEAN
If enabled, Tower will act as an Ansible Fact Cache
Plugin; persisting facts at the end of a playbook run
to the database and caching facts for use by Ansible.
--host_config_key TEXT
--ask_scm_branch_on_launch BOOLEAN
--ask_diff_mode_on_launch BOOLEAN
--ask_variables_on_launch BOOLEAN
--ask_limit_on_launch BOOLEAN
--ask_tags_on_launch BOOLEAN
--ask_skip_tags_on_launch BOOLEAN
--ask_job_type_on_launch BOOLEAN
--ask_verbosity_on_launch BOOLEAN
--ask_inventory_on_launch BOOLEAN
--ask_credential_on_launch BOOLEAN
--survey_enabled BOOLEAN
--become_enabled BOOLEAN
--diff_mode BOOLEAN If enabled, textual changes made to any templated
files on the host are shown in the standard output
--allow_simultaneous BOOLEAN
--custom_virtualenv TEXT
Local absolute file path containing a custom Python
virtualenv to use
--job_slice_count INTEGER
The number of jobs to slice into at runtime. Will
cause the Job Template to launch a workflow if value
is greater than 1.
--webhook_service {,github,gitlab}
Service that webhook requests will be accepted from
--webhook_credential ID
Personal Access Token for posting back the status to
the service API
Hello, We noticed you said you are running AWX version: 3.8.6. That particular version is a version of Controller. We would recommend that you reach out to Red Hat Support.
Unless I'm misunderstanding how awx-cli works, the Controller version shouldn't matter. The problem is with awx-cli, not the Controller.
I observe the similar behavior with AWX 21.0.0
and instance modify
sub-command. Testing against AWX 21.7.0
works, however. awxkit
version 21.0.0
or 21.7.0
doesn't make much difference though.
@brando56894,
It looks like you're using the RPM build for RHEL. Please reach out to the Red Hat support team and submit a ticket. Here is the link: https://access.redhat.com/support
Thank you!
Same when using on Ubuntu with pip install awxkit
Version: 21.1.0