Defining a project

A project, in AWX terms, is a simply a collection of Ansible playbooks grouped together. These collections of playbooks are often retrieved from a Source Control Management (SCMsystem, and indeed, this is the recommended way to host Ansible playbooks in an enterprise. Using an SCM means that everyone is working from the same version of code, and all changes are tracked—all elements that are vital in an enterprise environment.

With regards to the grouping of playbooks, there is no right or wrong way to organize projects, so this is very much up to the teams involved. Put simply, one project links to one repository, and so where it makes sense for multiple playbooks to live in one repository, it would make sense for them to live in one project within AWX.

For the sake of simplicity, it is also possible to store Ansible playbooks locally. This is useful when testing or when starting out, and we will utilize this capability in our example here.

Logging into the AWX interface using the admin account, click on the projects link on the left-hand menu bar. Then click on the green + button near the top right of the window—this creates a new blank project for us.

For now, we not need to worry about all the fields (more on some of these later)—however, we now need to configure the following:

Field Name Value Notes
NAME Mastery Examples A unique name to distinguish the project from the others.
SCM TYPE Manual Refers to the source of the playbook code—note the other options available in the drop-down list. Manual refers to playbooks on the local disk.
PLAYBOOK DIRECTORY mastery This is the name of the directory we defined earlier in the chapter, and put our example.yaml file in.

 

The end result should look something like this:

Click the green SAVE button to store your edits. That's it—you have defined your first Project in AWX! From here, we can define an inventory.

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

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