Bootstrap FreeKB - Ansible - Getting Started with tower-cli
Ansible - Getting Started with tower-cli

Updated:   |  Ansible articles

By default, the Ansible Tower command line tool is not installed. These examples are based on Linux. First, install pip. Then, install the command line interface.

pip install ansible-tower-cli


The tower-cli command is then used to issue commands. For example, to list the tower-cli version.

~]$ tower-cli --version
Tower CLI 3.3.9


For example, the following probably are configs you probably want to make.

tower-cli config username your_username
tower-cli config password your_password
tower-cli config host
tower-cli config verify_ssl false


Which should then be stored in the hidden tower_cli.cfg file.

~]$ cat /home/john.doe/.tower_cli.cfg 
username = john.doe
password = itsasecret
host =
verify_ssl = false


Assuming at least one Job Template has been created in Tower, the job_template list command should return the Job Templates.

~]$ tower-cli job_template list
===== ====================== ========= ======= ===========
 id   name                  inventory project playbook             
==== ====================== ========= ======= ===========
 991 my job template        123       456     example.yml


Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee


Add a Comment

Please enter a43e24 in the box below so that we can be sure you are a human.