awx command line tool against your server.
Prerequisites
- An AWX server, or an Ansible Automation Platform controller, reachable from CloudThinker over HTTPS. For a server on a private network, see Reaching private services.
- An AWX user for CloudThinker with access to the organizations, inventories, and templates agents should reach.
Setup
1
Create a user for CloudThinker
In AWX, create a user such as
cloudthinker and give it roles only on the resources agents need (see Required permissions). A dedicated user keeps the token’s reach small and easy to revoke.2
Create an access token
Sign in as that user. Open the user menu, select User Details, go to the Tokens tab, and click Add:
- Application: leave empty
- Scope: Read to monitor only, or Write if agents should launch and change things
3
Add the connection in CloudThinker
Open More → Workspace settings → Connections, stay on the Builtin Connections tab, and select AWX. Fill in:
- TOWER_HOST: your AWX address, such as
https://awx.example.com - TOWER_OAUTH_TOKEN: the token you copied
awx me with the token to confirm it can sign in.Success state: the dialog closes and the connection shows Connected. Run the verify prompt below.Connection details
Required permissions
Two things decide what agents can do: the token’s scope and the user’s roles in AWX. The token can never do more than the user. With a Write token, the user’s roles are the ceiling, and Approvals decides each action within it. To block every write in CloudThinker too, turn off the Allow writes switch on the AWX connection’s detail panel.Agent capabilities
Every write goes through Approvals, and a rejected request isn’t retried. With a Read token, AWX refuses writes even after approval.
Verify the connection
Example prompts
Troubleshooting
Connect fails with Failed to connect to AWX
Connect fails with Failed to connect to AWX
CloudThinker couldn’t run
awx me against TOWER_HOST. The dialog shows the same message for an unreachable server and a bad token, so check both. First open TOWER_HOST in a browser from outside your network: it must load over HTTPS. If it does, the token is expired or revoked. Create a new token, edit the connection, and paste it in.Requests return 401
Requests return 401
The token is missing, expired, or revoked. Create a new token for the CloudThinker user and update TOWER_OAUTH_TOKEN.
Launch or sync is refused
Launch or sync is refused
The token has Read scope, or the user lacks Execute on the template or Update on the project. Create a Write token or grant the role in AWX, then ask again.
Lists come back empty
Lists come back empty
The user can’t see those resources. Grant Read on the organizations or inventories agents should reach. No need to reconnect; roles apply on the next request.
Extra variables are ignored on launch
Extra variables are ignored on launch
AWX drops extra variables unless the template allows them. Edit the job template, turn on Prompt on launch for Variables, and launch again.
Job output is empty
Job output is empty
AWX returns output only after a job finishes. Ask again once the job’s status is successful or failed.
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Read scope first: use a Write token only when agents should launch or change things, and scope the user’s roles to those templates.
- HTTPS only: always use an HTTPS TOWER_HOST. Plain HTTP sends the token in clear text.
Related
Approvals
Decide which AWX launches wait for a person.
Automation
Run AWX checks on a schedule, such as a daily failed-jobs report.