Hello and welcome to our Getting Started series with Oracle Linux Automation Manager.
As part of this series, we previously covered creating users to set up role-based access
control, known as RBAC.
If you haven't seen it, be sure and check out "Users and Credentials in Oracle Linux
Automation Manager."
Now, jumping into today's topic, we'll be discussing the creation of projects and inventories.
So let's get started.
With a few users created and permissions granted, we need to give them something to work on.
This work is defined in a Project.
A Project is a compilation of playbooks grouped together based on their actions or the hosts
they interact with.
When using Oracle Linux Automation Manager, we have multiple ways to manage these playbooks.
The easier of these is called the Manual method.
As the name infers, We'll need to manually copy the playbooks and any associated files
to a directory under the Project Base Path.
When copying the playbooks to the instance, take care to match existing Linux-level ownership
and permissions shown under /var/lib/ol-automation-manager/projects.
It's essential to complete this step before trying to create our project.
The better option for managing, maintaining, and hosting our playbooks is to use a git-based
source control management (SCM) solution such as GitHub or Gitlab.
When using an SCM solution, we can track and limit changes to our playbooks using a proper
Git workflow, which is a topic for another day.
For our purposes, using SCM allows easy import of our playbooks and files from the git repo
when creating the project.
Thus letting Oracle Linux Automation Manager handle directory creation, copying, and the
necessary permissions on the instances file system.
Well, that's enough talk, how about we create a Project?
Navigate under Resources and click Projects.
Click the green plus button to open the New Project page.
Let's enter Testing as the name for the project and associate it with the Example Organization.
Then pick the SCM type.
I've selected the Manual type for this project.
The Project Base Path will default to /var/lib/awx/projects.
Then we need to select a Playbook Directory.
As mentioned earlier, this directory needs to already exist on the instance.
Review the information entered and click the Save button.
Wait, didn't I suggest it was better to use Git?
So let's look at doing that instead.
Navigate to the Testing project's details page, and change the SCM type from Manual
to Git.
Then enter the URL for your playbook's git repository and any other necessary information
to access your repo.
Suppose you have questions about what the different options do.
In that case, just click any of the circular question marks next to the fields for more
details and examples.
For example, if we always want to pull the latest code from the git repo at runtime,
tick the box next to the "update revision on launch" option.
Once we're done with our changes, click the Save button.
The summary switches the Testing project's label to GIT and activates the dot next to
its name.
When the dot turns green, the project is then in sync.
If interested in viewing the results from the sync job, we can click the green dot.
However, those details and how to read job results are outside our current scope.
Well, our project's created.
What's next?
How about finding hosts to automate and run those playbooks against?
In Oracle Linux Automation Manager, these hosts are grouped together and called Inventories.
When adding hosts to an Inventory, we can add them manually using either its hostname
or IP address.
Regardless of how we enter it, the host should be routable and accessible using ssh.
Another way we can add hosts in Oracle Linux Automation Manager is by importing from an
Ansible hosts file or using a dynamic inventory source.
Those options add a bit of complexity, so we'll be adding a static inventory to keep
things simple.
Navigate under Resources and, this time, click Inventories.
Click the green plus button and select Inventory.
Let's enter Development as the name for the inventory and associate it with the Example
Organization.
If we had any Inventory variables, we'd add those in either YAML or JSON syntax, selecting
the appropriate toggle.
For more details on Inventory variables, check out the Oracle Linux Automation Engine or
upstream documentation.
Review and then click the Save button.
We're not done yet.
Now let's add hosts to the Inventory by clicking the Hosts tab.
Click the green plus button and enter the hostname or IP address of one of our hosts.
Enter any specific variables applicable to this host and click the Save button.
Once a host has been added, we can enable or disable it for jobs, update it, or even
delete it.
But adding it is all we will do today.
In the future, we will use this information to create a job and run playbooks against
the host listed in the inventory.
That completes the essentials for creating projects and setting up an inventory.
Thank you for watching.
For additional information on Oracle Linux Automation Manager, access the Oracle Linux
Documentation or Oracle Linux Learning Library.