As part of our recent AWX 7.0.0 release, we’re pleased to announce that we’ve released a new official AWX command line interface.
We recently started an initiative to come up with an official community-supported alternative to the open source https://github.com/ansible/tower-cli/ library some of you may be familiar with.
While tower-cli has served many of you well, it has some technical limitations which have made it cumbersome to maintain and add support to as AWX has grown.
The new AWX CLI in 7.0.0 is intended as a spiritual successor (if you’ve used tower-cli in the past, you’ll find this new interface familiar), and is a tool that we intend to test and maintain as AWX changes.
We’d love for you to try it out - installing it and generating its documentation is relatively simple using the instructions at:
If you have feedback, please share it here, and please file any bugs (or enhancement requests) you discover at the official issue tracker: https://github.com/ansible/awx/issues/new/
hi my interest is given this announcement, does tower-cli support awx 7
? and at what point will it be dropped entirely ?
tower-cli supports AWX 7 to the extent that the APIs it uses are the same
as when features were added to tower-cli; this means for most basic operations
it should work OK. New functionality in AWX 6 or AWX 7 may not be supported in
tower-cli, and we do not have plans to add it.
For docker awx installs do you install this on the awx_web or awx_task container. I assume you don’t install it on the server hosting the docker containers.
So I’m trying to make use of this, and I’m looking for a bit of advice. When I’m boot strapping an AWX system, I need to use the cli for some tasks. Traditionally I’ve written out a tower_cli config file that stores the credentials, so that I’m not adding the credentials to every task execution (and then marking them as no_log to prevent credential leakage). It seems awx cli doesn’t support this and only works via the oauth2 methods. I can either specify the credentials on the command line for every task, or I can get a token and set the token in the ENV. I’m looking for some guidance on bootstrapping that token, via Ansible. I can certainly do a task to get the token output, and then carve up that output to get the actual token bits, but that seems like a bit of a mess. Is there a better way to simply get the token that I can then stash in a file for later reference, or stash in the env of an Ansible play?
Could also try pulling the token directly from your AWX instance and store that in an env var /file for later. Maybe even after the play completes you could expire the token. Sample snippet:
`
name: Create a personal access token with read/write scope
uri:
method: POST
url: https://awx.com/api/v2/users/1/personal_tokens/
user: “{{ username }}”
password: “{{ password }}”
force_basic_auth: yes
body_format: json
body: {“description”: “AWXKit Token”, “scope”: “{{ mode }}”}
status_code: 201
register: post_result
no_log: true
name: Store token into variable ‘oauth2_token’
set_fact:
awx_oauth2_token: “{{ post_result.json.token }}”
no_log: true
`