How to run ansible cli in awx

Hi,
I don’t seem to find the answer anywhere,
I've just started to deploy and use ansible AWX. There are lots of tutos on ansible CLI. So when I run in the awx_task container for example
ansible-inventory --graph
it doesn't list the inventories and hosts I defined in ansible AWX.
So is the only solution to use tower-cli to interact with AWX ? I can't do any local cli on the server with ansible directly ... ?
Many thanks

I meant I can use the AWX gui with no issue. Just wondering if I can use ansible cli as well

The whole point of using AWX is so that you don’t need the CLI, or rather that’s one of its selling points.

What I suggest, if you want to run ansible-playbook using the same inventories is for you to create an external inventory script which accesses AWX. Then you have users who can run jobs from AWX and others who run jobs locally on the command line.

I respectfully have a different perspective. One of Awx/tower strengths is that it allows you to share your automation with rbac capability. If you log in as a particular user you only get to see certain job templates. I can then run that from any cli that I need to. Consider the command line. How can you share a playbook with just enough permission to do a certain task? It’s not that easy without things being disjointed. Awx /tower does have a cli. In fact I have used it and it works a treat. There is the deprecated tower-cli and awx-cli. Both work.

– You received this message because you are subscribed to the Google Groups “AWX Project” group. To unsubscribe from this group and stop receiving emails from it, send an email to . To view this discussion on the web visit .

I respectfully have a different perspective.

Right you are!

I interpreted OP’s question as wanting to run on command-line only in spite of having AWX, due mainly to this “I can’t do any local cli on the server with ansible directly”.

I quite agree that using the API (or by extention the deprecated tower-cli or the new awx-cli) are the way to provide access to running playbooks withing AWX to humans, and t o machines.

-JP

Going off topic The rest api is amazing. I am a windows guy but trade and I use a powershell module called ansibletower to wrap around the rest api’s.

– You received this message because you are subscribed to the Google Groups “AWX Project” group. To unsubscribe from this group and stop receiving emails from it, send an email to . To view this discussion on the web visit .