RedHat Ansible Automation Platform 2.4 - Getting Started With Automation Controller
RedHat Ansible Automation Platform 2.4 - Getting Started With Automation Controller
2.4
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is
available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must
provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift,
Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States
and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and
other countries.
Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the
official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks
or trademarks/service marks of the OpenStack Foundation, in the United States and other
countries and are used with the OpenStack Foundation's permission. We are not affiliated with,
endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
Abstract
Learn how to set up a controller application, which you can then use to launch more sophisticated
playbooks. The setup process should take less than thirty minutes.
Table of Contents
Table of Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3. . . . . . . . . . . . .
PREFACE
. . . . . . . . . .OPEN
MAKING . . . . . . SOURCE
. . . . . . . . . .MORE
. . . . . . .INCLUSIVE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . .
. . . . . . . . . . . . . FEEDBACK
PROVIDING . . . . . . . . . . . . ON
. . . .RED
. . . . .HAT
. . . . .DOCUMENTATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5. . . . . . . . . . . . .
. . . . . . . . . . . 1.. .LOGGING
CHAPTER . . . . . . . . . . .INTO
. . . . . .THE
. . . . AUTOMATION
. . . . . . . . . . . . . . . .CONTROLLER
. . . . . . . . . . . . . . .DASHBOARD
. . . . . . . . . . . . . . AFTER
. . . . . . . .INSTALLATION
. . . . . . . . . . . . . . . . . . . . . . 6. . . . . . . . . . . . .
.CHAPTER
. . . . . . . . . . 2.
. . MANAGING
. . . . . . . . . . . . .YOUR
. . . . . . .ANSIBLE
. . . . . . . . . AUTOMATION
. . . . . . . . . . . . . . . .CONTROLLER
. . . . . . . . . . . . . . .SUBSCRIPTION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7. . . . . . . . . . . . .
2.1. OBTAINING AN AUTHORIZED ANSIBLE AUTOMATION CONTROLLER SUBSCRIPTION 7
2.2. IMPORTING A SUBSCRIPTION 7
2.3. TROUBLESHOOTING: KEEPING YOUR SUBSCRIPTION IN COMPLIANCE 10
2.4. HOST METRIC UTILITIES 10
.CHAPTER
. . . . . . . . . . 3.
. . USING
. . . . . . . .THE
. . . . .AUTOMATION
. . . . . . . . . . . . . . .CONTROLLER
. . . . . . . . . . . . . . . DASHBOARD
. . . . . . . . . . . . . . FOR
. . . . . IT
. . .ORCHESTRATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11. . . . . . . . . . . . .
3.1. VIEWING THE DASHBOARD 11
. . . . . . . . . . . 4.
CHAPTER . . .MANAGING
. . . . . . . . . . . . ORGANIZATIONS
. . . . . . . . . . . . . . . . . . .IN
. . AUTOMATION
. . . . . . . . . . . . . . . .CONTROLLER
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
..............
4.1. REVIEWING THE ORGANIZATION 13
4.2. EDITING AN ORGANIZATION 14
. . . . . . . . . . . 5.
CHAPTER . . USER
. . . . . . .ROLES
. . . . . . . IN
. . .AUTOMATION
. . . . . . . . . . . . . . . CONTROLLER
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
..............
. . . . . . . . . . . 6.
CHAPTER . . .INVENTORIES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
..............
6.1. CREATING A NEW INVENTORY 16
6.2. MANAGING GROUPS AND HOSTS 16
6.2.1. Adding new groups and hosts 17
.CHAPTER
. . . . . . . . . . 7.
. . MANAGING
. . . . . . . . . . . . .CREDENTIALS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
..............
7.1. CREATING A CREDENTIAL 18
7.2. EDITING A CREDENTIAL 18
.CHAPTER
. . . . . . . . . . 8.
. . .MANAGING
. . . . . . . . . . . . PROJECTS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
..............
8.1. SETTING UP A PROJECT 19
8.2. EDITING A PROJECT 19
8.3. SYNCING A PROJECT 20
.CHAPTER
. . . . . . . . . . 9.
. . .WORKING
. . . . . . . . . . .WITH
. . . . . .JOB
. . . . .TEMPLATES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
..............
9.1. GETTING STARTED WITH JOB TEMPLATES 21
9.2. EDITING A JOB TEMPLATE 21
9.3. RUNNING A JOB TEMPLATE 22
1
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
2
PREFACE
PREFACE
To begin, install Ansible Automation Platform and choose a target system where you can deploy an initial
playbook (provided by automation controller). This first playbook executes simple Ansible tasks, while
teaching you how to use the controller and properly set it up. You can use any sort of system
manageable by Ansible, as described in the Managed nodes section of the Ansible documentation. For
further instructions, see the Red Hat Ansible Automation Platform Installation Guide .
NOTE
3
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
4
PROVIDING FEEDBACK ON RED HAT DOCUMENTATION
NOTE
You must have a Red Hat account and be logged in to the customer portal.
5. Enter your feedback in the text box on the right of the page and then click Submit.
We automatically create a tracking issue each time you submit feedback. Open the link that is displayed
after you click Submit and start watching the issue or add more comments.
5
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
Procedure
1. With the login information provided after your installation completed, open a web browser and
log in to the automation controller by navigating to its server URL at:
https://<CONTROLLER_SERVER_NAME>/
2. After you have accessed the controller user interface (UI), use the credentials specified during
the installation process to login. The default username is admin. The password for admin is the
value specified for admin_password in your inventory file.
Click the the More Actions icon ⋮ next to the desired user.
Click Edit.
6
CHAPTER 2. MANAGING YOUR ANSIBLE AUTOMATION CONTROLLER SUBSCRIPTION
Procedure
If you already have a Red Hat Ansible Automation Platform subscription, use your Red Hat
customer credentials when you launch the automation controller to access your subscription
information. See Importing a subscription .
If you have a non-Ansible Red Hat or Satellite subscription, access automation controller with
one of these methods:
Obtain a subscriptions manifest from the Subscription Allocations page on the Red Hat
Customer Portal. For detailed information, see Obtaining a subscriptions manifest in the
Automation Controller User Guide.
If you do not have a Red Hat Ansible Automation Platform subscription, go to Try Red Hat
Ansible Automation Platform and request a trial subscription.
Additional resources
To understand what is supported with your subscription, see Red Hat Ansible Automation Platform
Controller Licensing, Updates, and Support. If you have issues with your subscription, contact your Sales
Account Manager or Red Hat Customer Service at:
https://access.redhat.com/support/contact/customerService/.
Prerequisites
You have obtained a subscriptions manifest. For more information, see Obtaining a
subscriptions manifest in the Automation Controller User Guide.
Procedure
1. Launch controller for the first time. The Subscription Management screen is displayed.
7
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
2. Retrieve and and import your subscription by completing either of the following steps:
a. If you have obtained a subscription manifest , upload it by navigating to the location where
the file is saved (the subscription manifest is the complete .zip file, and not only its
component parts).
NOTE
If the Browse option in the subscription manifest option is disabled, clear the
username and password fields to enable it.
The subscription metadata is then retrieved from the RHSM/Satellite API, or from the
manifest provided. If multiple subscription counts were applied in a single installation,
automation controller combines the counts but uses the earliest expiration date as the
expiry (at which point you must refresh your subscription).
b. If you are using your Red Hat customer credentials, enter your username and password on
the license page. Use your Satellite username or password if your automation controller
cluster nodes are registered to Satellite with Subscription Manager. After you enter your
credentials, click Get Subscriptions.
Automation controller retrieves your configured subscription service. Then, it prompts you
to choose the subscription that you want to run and applies that metadata to automation
controller. You can log in over time and retrieve new subscriptions if you have renewed.
3. Click Next to proceed to Tracking and Insights. Tracking and insights collect data to help Red
Hat improve the product and deliver a better user experience. For more information about data
collection, see Usability Analytics and Data Collection . This option is checked by default, but you
can opt out of any of the following:
b. Insights Analytics. Provides a high level analysis of your automation with automation
controller. It helps you to identify trends and anomalous use of the controller. For opt-in of
Automation Analytics to be effective, your instance of automation controller must be
running on Red Hat Enterprise Linux. For more information, see the Automation Analytics
section.
NOTE
You can change your analytics data collection preferences at any time, as
described in the Usability Analytics and Data Collection section.
4. After you have specified your tracking and Insights preferences, click Next to proceed to the
End User Agreement.
8
CHAPTER 2. MANAGING YOUR ANSIBLE AUTOMATION CONTROLLER SUBSCRIPTION
5. Review and check the I agree to the End User License Agreementcheckbox and click Submit.
After your subscription is accepted, automation controller displays the subscription details and opens
the Dashboard. To return to the Subscription settings screen from the Dashboard, select Settings →
Subscription settings from the Subscription option in the navigation panel.
Troubleshooting
When your subscription expires (you can check this in the Subscription details of the Subscription
settings window), you must renew it in automation controller by one of the preceding two methods.
If you encounter the "Error fetching licenses" message, check that you have the proper permissions
required for the Satellite user. The automation controller administrator requires this to apply a
subscription.
The Satellite username and password is used to query the Satellite API for existing subscriptions. From
the Satellite API, the automation controller receives metadata about those subscriptions, then filters
through to find valid subscriptions that you can apply. These are then displayed as valid subscription
options in the UI.
Viewer
Administrator
Organization Administrator
Manager
Use the Custom role for your automation controller integration, as it is the most restrictive. For more
information, see the Satellite documentation on managing users and roles.
NOTE
The System Administrator role is not equivalent to the Administrator user checkbox,
and does not provide sufficient permissions to access the subscriptions API page.
9
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
Compliant: Indicates that your subscription is appropriate for the number of hosts that you have
automated within your subscription count.
Out of compliance: Indicates that you have exceeded the number of hosts in your subscription.
For more information, see Subscription compliance in the Automation Controller User Guide.
For more information, see the Host metrics utilities section of the Automation Controller User Guide.
10
CHAPTER 3. USING THE AUTOMATION CONTROLLER DASHBOARD FOR IT ORCHESTRATION
Procedure
On the main dashboard, a summary appears listing your current Job status.
You can filter the job status within a period of time or by job type.
You can view summaries of Recent Jobs and Recent Templates in their respective tabs.
The last item in the navigation panel is Settings, which provides access to automation controller
configuration settings.
Authentication
Jobs
System-level attributes
11
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
For more information, see Controller Configuration in the Automation Controller Administration Guide.
NOTE
12
CHAPTER 4. MANAGING ORGANIZATIONS IN AUTOMATION CONTROLLER
Procedure
NOTE
You can use the default organization as it is initially set up and edit it later.
NOTE
Enterprise and Premium license users who want to add a new organization should refer to the
Organizations section in the Automation Controller User Guide.
13
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
Procedure
Go to Details → Edit.
From the navigation panel, select Organizations → Edit Organization next to the
organization name and edit the appropriate details.
14
CHAPTER 5. USER ROLES IN AUTOMATION CONTROLLER
A default administrator user with the role of System Administrator is automatically created and is
available to all users of automation controller. You can use it as it is or edit it later. You can add other
users to an organization, including a Normal User, System Auditor, or System Administrator, but you
must create them first.
For more information, see the Users section in the Automation Controller User Guide.
For the purpose of the getting started guide, leave the default user as it is.
15
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
CHAPTER 6. INVENTORIES
An inventory is a collection of hosts managed by automation controller. Organizations are assigned to
inventories, while permissions to launch playbooks against inventories are controlled at the user or team
level.
Teams - Permissions
Procedure
Automation controller provides a demonstration inventory for you to use as you learn how
the controller works. You can use it as it is or edit it later. You can create another inventory,
if necessary.
2. To add another inventory, see Add a new inventory in the Automation Controller User Guide for
more information.
As with organizations, inventories also have associated users and teams that you can view through the
Access tab. For more information, see Inventories in the Automation Controller User Guide.
A user with the role of System Administrator has been automatically populated for this.
16
CHAPTER 6. INVENTORIES
"Datacenter 1" or "Stage Testing"), a server type (such as "Application Servers" or "DB Servers"), or any
other representation of your environment. The groups and hosts that belong to the Demo inventory are
shown in the Groups and Hosts tabs.
Procedure
As part of the initial setup and to test that automation controller is set up properly, a local host is added
for your use.
Example
If the organization that you created has a group of web server hosts supporting a particular application,
complete the following steps:
1. Create a group and add the web server hosts, to add these hosts to the inventory.
2. Click Cancel (if no changes were made) or use the breadcrumb navigational links at the top of
the automation controller browser to return to the Inventories list view. Clicking Save does not
exit the Details dialog.
17
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
Procedure
2. To add a new credential, see Add a new Credential in the Automation Controller User Guide for
more information.
NOTE
When you set up additional credentials, the user you assign must have root
access or be able to use SSH to connect to the host machine.
Procedure
Go to Details → Edit.
From the navigation panel, select Credentials → Edit Credential next to the credential
name and edit the appropriate details.
18
CHAPTER 8. MANAGING PROJECTS
By placing them manually under the Project Base Path on your automation controller server.
By placing your playbooks into a source code management (SCM) system supported by the
automation controller. These include Git, Subversion, and Mercurial.
NOTE
This Getting Started Guide uses lightweight examples to get you up and running. But for
production purposes, you must use source control to manage your playbooks. The best
practice is to treat your infrastructure as code which is in line with DevOps ideals.
Procedure
Procedure
Go to Details → Edit.
From the navigation panel, select Projects → Edit Project next to the project name and
edit the appropriate details.
19
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
Procedure
1. Open the project to update the SCM-based demo project by using one of these methods:
Go to Details → Sync.
NOTE
When you add a project set up to use source control, a "sync" starts. This fetches the
project details from the configured source control.
20
CHAPTER 9. WORKING WITH JOB TEMPLATES
Procedure
Procedure
From the navigation panel, select Templates → Edit Template next to the template name
and edit the appropriate details.
21
Red Hat Ansible Automation Platform 2.4 Getting started with automation controller
3. To exit after saving and return to the Templates list view, use the breadcrumb navigation links
or click Cancel. Clicking Save does not exit the Details dialog.
Procedure
From the navigation panel, select Templates → Launch next to the job template.
22
CHAPTER 9. WORKING WITH JOB TEMPLATES
The initial job launch generates a status page, which updates automatically using automation controller’s
Live Event feature, until the job is complete.
For more information on the job results, see Jobs in the Automation Controller User Guide.
Additional resources
To learn more about these automation controller features or to learn about administration tasks and the
controller API, see the following documentation sets:
Ansible Documentation
23