The AWX Project (AWX) is an open source community project. In addition, it’s the OpenSource version of the Ansible Tower software sponsored by Red Hat, that enables users to better control their Ansible project use in IT environments.
In this tutorial, we’ll provide a step by step instructions about how to add a new inventory, create a host and adding a credential on AWX. If you did not install yet AWX you can follow our previous tutorial How to Install Ansible AWX without Docker on CentOS 7 / RHEL 7
01/ Add a new inventory
An Inventory is a collection of hosts against which jobs may be launched, the same as an Ansible inventory file. Additionally, inventories are divided into groups and these groups contain the actual hosts. Groups may be sourced manually, by entering host names into Tower, or by supported cloud providers Source (Amazon EC2, Microsoft Azure, Google Cloud Engine,…) .
– To create a new inventory or Smart Inventory follow the below steps:
01- Click the
Inventories icon from the left navigation bar.
02- Click the add button
+, and select the type of inventory to create.
03- Enter the required details like the
organization as below:
Save when done.
02/ Create a Host
After creating a new inventory, you can proceed with configuring a new hosts. To create a host follow the below steps :
01- Go the
Inventories tab and choose the inventory to which you want to add hosts.
02- Select the
Hosts tab and click on create a new host button
03- Provide a
host name or
Description and Enter
inventory variables if it’s necessary:
Save when done.
03/ Create a Credential
Credentials authenticate the Awx user to launch Ansible playbooks, which can include passwords and SSH keys, against inventory hosts.
01- From the left navigation bar, click the
02- Enter all the details required, like the
Name, optionally enter a
Description and select the name of the
Organization with which the credential is associated:
03- Specify the type of credential you want to create. The credential type could be
Amazon Web Services,
Microsoft Azure Resource Manager,
Machine,… In this example we will select machine Credential type:
04- Machine credentials have several attributes that may be configured like the
username for SSH authentication,
Password or even you can enter
SSH Private Key, not only, but also you can specify
Privilege Escalation Method it’s like
You have learnt the steps to add a new inventory, create a new Host and add a new Credential on AWX Ansible Tower. For more information, you can now visit the official Ansible Tower Documentation page.
I’m facing a problem while adding a Fortigate firewall as a Host machine to my Ansible Controller. Could anyone help with this issue? I have copied the id_rsa.pub key on Firewall but unable to ping that Firewall, getting an error like permission denied.
I need to configure SNMP on Fortigate through Ansible, Once I fix this issue. Hope you people will help me in this issue.
Why don’t you use a user and password to access your fortigate firewall instead of using ssh key