Setting up credentials in AWX

When you log in to AWX, you will notice a menu bar down the left-hand side of the screen. To define a new set of credentials that we will use to allow Ansible to log into our target machine, perform the following steps:

  1. Click on Credentials in the left-hand menu bar.
  2. Click on the green + icon to create a new credential.
  3. Give the credential a name and select Machine from the CREDENTIAL TYPE field. There are many types of credentials that enable AWX to interact with a wide variety of services, but for now, we are only interested in this particular type.
  4. There are many other fields available for specifying parameters for more advanced use caseshowever, for our demonstration purposes, this is sufficient. 

Your end result should look something like the following screenshot. Note that I have specified the login password for my demo machine, but you could equally have specified the SSH private key in the larger text box on the screen. You will also observe the presence of the Prompt on launch checkboxthere are many options in AWX that it can prompt the user for at the time a playbook is run, which can lend itself to a really rich interactive user experience. However, in this demo, we won't do this as we want to demonstrate playbooks running without user intervention:

When you have a credential defined, the next step is to define the inventory to run our playbook against. We'll explore this in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset