0% found this document useful (0 votes)
120 views26 pages

Get Started With Red Hat Ansible Tower

tower-x.x.x.tar.gz tar -xvf tower-x.x.x.tar.gz password, secret_key you can log in to the web UI. tower-setup Step 1: Step 2: Step 3: Step 4: Make sure you have the Unpack the tar file. Set up your passwords: Run the setup script. Once latest Ansible Tower edition. installation has completed, admin_ tower-x.x.x.tar.gz tar -xvf tower-x.x.x.tar.gz password, secret_key you can log in to the web
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views26 pages

Get Started With Red Hat Ansible Tower

tower-x.x.x.tar.gz tar -xvf tower-x.x.x.tar.gz password, secret_key you can log in to the web UI. tower-setup Step 1: Step 2: Step 3: Step 4: Make sure you have the Unpack the tar file. Set up your passwords: Run the setup script. Once latest Ansible Tower edition. installation has completed, admin_ tower-x.x.x.tar.gz tar -xvf tower-x.x.x.tar.gz password, secret_key you can log in to the web
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

GET STARTED

WITH RED HAT


ANSIBLE TOWER
Follow our comprehensive guide to get you
up and running with Ansible Tower in no time.
Get started with the basics
Ansible is a powerful IT automation and orchestration engine that is simple enough

Contents
for everyone in your IT team to use, yet powerful enough to automate even the
most complex multi-tier IT applications and environments. Red Hat Ansible Engine
is a fully supported product built on the foundational capabilities derived from the
Ansible project.
Get Started with Ansible
Ansible makes automation simple. Ansible Engine gives you support, and
Ansible Tower is the framework that puts you in control.

Writing a Playbook

Going from Ansible


to Ansible Tower

Installing Ansible Tower

Configuring Ansible Tower

Ansible Galaxy
GET STARTED Ansible is an IT automation engine that
thousands of companies are using to drive

WITH ANSIBLE complexity out of their environments and


accelerate DevOps initiatives.
Automation
for Everyone
Ansible is designed around the way people
work and the way people work together.

Complexity kills productivity.


Every business is a digital business. Technology is your
innovation engine, and delivering your applications
faster helps you win. Historically, that required a lot of
manual effort and complicated coordination.

Ansible is a simple automation language that can


perfectly describe an IT application infrastructure. It’s
easy-to-learn, self-documenting, and doesn’t require a
grad-level computer science degree to read. Automation
shouldn’t be more complex than the tasks it’s replacing.

Automation powered by people.


Ansible is community powered and is the most popular
open source automation tool on GitHub today with
more than a quarter million downloads per month. With
thousands of contributors submitting new modules all
the time, rest assured that what you are automating is
covered in Ansible already, or will be very soon.

Get Started with Ansible 4


KEY TAKEAWAYS

1. Accelerate DevOps with Ansible.


Use Ansible to drive complexity out of your
environments and accelerate DevOps initiatives.
Are you ready to scale automation,
manage complex deployments and
2. Ansible is community powered.
Ansible is open source and created by contributors speed up productivity?
from an active open source community.

DOWNLOAD A FREE TOWER TRIAL

ON-DEMAND WEBINAR

Intro to Ansible webinar


WRITING A Playbooks are a set of human readable
instructions (plays) or commands by which

PLAYBOOK automation runs within Ansible.

At a basic level, playbooks can be used to


manage configurations of and deployments
to remote machines. At a more advanced
level, they can sequence multi-tier rollouts
involving rolling updates, and can delegate
actions to other hosts, interacting with
monitoring servers and load balancers
along the way. Once written, playbooks
can be used again and again across your
enterprise for easy automation.
No Special Skills Necessary
Playbooks require no special coding skills.
Everyone in your IT organization can read ---
an Ansible Playbook and understand it. - name: Install nginx
hosts: host.name.ip
This simplicity means that you can start using Ansible become: true
to do real work in just minutes.
tasks:
What’s in a Playbook - name: Add epel-release repo
Playbooks start with the YAML three dashes (---) yum:
followed by: name: epel-release
Name: a brief description of the overall function state: present
of the playbook, which assists in keeping it
readable and organized for all users. - name: Install nginx
yum:
Hosts: identifies the target(s) for Ansible to run
name: nginx
against.
state: present
Become: this optional statement can be set to
‘true’/’yes’ to activate privilege escalation (e.g., - name: Insert Index Page
sudo, su, pfexec, doas, pbrun, dzdo, ksu, etc.). template:
src: index.html
Tasks: this is where actions that get executed via a
dest: /usr/share/nginx/html/index.html
call to an Ansible module get listed.

- name: Start nginx


service:
name: nginx
state: started

Writing a Playbook 7
Playbooks are Not Code
Playbooks are, at a basic level, a list of tasks.

Tasks string together to form a “desired state.” It’s


this simple flow which makes a playbook readable
by anybody.

The technological heavy lifting is in Ansible’s


modules and plugins. Each module does one job
and does it well – ensuring the desired state is met,
but without doing extra work.

It’s this abstraction of the hard work that means


playbooks stay accessible to non-coders and
coders alike.

Writing a Playbook 8
KEY TAKEAWAYS

1. Keep your playbooks simple.


Playbooks are human readable instructions and
require no special coding skills.
Are you ready to scale automation,
manage complex deployments and
2. Playbooks are not code.
Try to keep things simple, without ‘programming’ speed up productivity?
style statements. But, gain the advantages of code-
like storage in version control (using GitHub, etc).

DOWNLOAD A FREE TOWER TRIAL

BLOG POST

Writing Your First Playbook


GOING FROM As organizations adopt Ansible
automation technology, the requirement

ANSIBLE TO to govern, manage, and effectively scale


IT automation increases.

ANSIBLE TOWER Enter Ansible Tower.


Extend the Power of
Ansible with Ansible Tower
Ansible Tower is an enterprise framework
for controlling, securing, and managing your
Ansible automation.

With an easy-to-use web based UI and RESTful API


for managing quick deployments and monitoring
configurations, Ansible Tower makes Ansible Engine
even more simple for IT teams to use and is designed
to be the hub for all your automation tasks.

With Ansible Tower:


Role-based access control keeps environments
secure and teams efficient.

Non-privileged users can safely deploy entire


applications with push-button deployment access,
even without previous Ansible knowledge.

All Ansible automations are centrally logged,


ensuring auditability and compliance.

Going from Ansible to Ansible Tower 11


KEY TAKEAWAYS

1. When you automate you accelerate.


Ansible Tower makes Ansible Engine even simpler
to use with its web-based GUI and is designed to
be the hub for all of your automation tasks. Are you ready to scale automation,
manage complex deployments and
2. Solve it. Automate it. Share it. speed up productivity?
Ansible Tower enables easy-to-scale IT
Automation, manages complex deployments
and speeds productivity.
DOWNLOAD A FREE TOWER TRIAL

ON DEMAND WEBINAR

Moving From Ansible CLI to Ansible Tower


INSTALLING In keeping with our pledge of delivering
simple yet powerful IT automation,

ANSIBLE TOWER installing Ansible Tower is easy.

You can have Ansible Tower installed and


ready to begin automating before your
coffee is brewed.
Installation is Easy
Installing Ansible Tower can be done on a single node in four simple steps.

Step 1: Step 2: Step 3: Step 4:

Make sure you have the Unpack the tar file. Set up your passwords: Run the setup script. Once
latest Ansible Tower edition. installation has completed,
admin_password for navigate to your Ansible
Ansible Tower administration Tower host using Google
Chrome or Mozilla Firefox by
rabbitmq_password for
using either the hostname or
Ansible Tower messaging
IP address.
pg_password for Ansible
Tower database

Note: Make sure passwords do


not contain special characters
( ! @ # $ % ^ & *)

If you prefer a clustered install – where you can run more playbooks at once by sharing the load – rather than an all-in-one approach, Ansible
Tower supports that, too. Clustering with Ansible Tower is quick and can be done with a few simple changes to your inventory file. Whether you
are adding one extra server to make a cluster or adding three, Ansible Tower helps your team scale Ansible capacity in your organization.

For more information on Installing an Ansible Tower Cluster visit our Getting Started series.

Installing Ansible Tower 14


KEY TAKEAWAYS

1. Installation is easy
In the time it takes to brew your coffee, you
can have Ansible Tower installed and ready to
begin automating. Are you ready to scale automation,
manage complex deployments and
2. Customize your installation speed up productivity?
Clustered installs are a great option for scaling
out Ansible capacity.

DOWNLOAD A FREE TOWER TRIAL

ANSIBLE DOCUMENTATION

Ansible Tower Quick Installation Guide


CONFIGURING Now that you have Ansible Tower
installed, you’ll want to do some

ANSIBLE TOWER configuration. Much like installing


Ansible Tower, you can configure
your instance of Ansible Tower in a
few steps.
Set Up a User Base
First, you’ll need to set up your user base and
create credentials for the appropriate delegation
of tasks.

The user base can be The user type can be


broken up into three types: broken up into three groups:

1. Organization: The top level of the user base - 1. Normal User: A user that is given no special
a logical collection of users, teams, projects and permissions from the beginning - permissions
inventories. must be granted to them by a system
administrator.
2. Team: A subdivision of an organization -
provides the means to set up and implement 2. System Auditor: A user who will have view-
role-based access schemes as well as to only access within Ansible Tower.
delegate work across organizations.
3. System Administrator: A user who has the
3. User: Someone who has access to power to grant and remove credentials, move
Ansible Tower with associated permissions and users to different organizations and teams and
credentials. other exclusive privileges.

Configuring Ansible Tower 17


Sorting and Creating Users
The user list contains the names of everyone who has access to Ansible Tower
with associated permissions and credentials. It can be sorted and searched by
toggling the Username, First Name or Last Name headers.

Step 1: Step 2: Step 3:

Select the Settings gear in the top right Select the +Add button and a user Save the user. You can now grant the user
and select Users. This will take you to creation page will be displayed. individual credentials and add them to
the users page. organizations or teams from the Edit User
From this page, you will also create their
screen.
Note: If you are starting fresh, only the “admin” default password that can be changed
account will be displayed. by them once they login for the first
time. After a password is set, you’ll set
the User Type (System Auditor, etc.).

For more information on Ansible Tower Users and Credentials visit our Getting Started series.

Configuring Ansible Tower 18


Creating an Ansible Tower Project
Projects are a collection of your Ansible Playbooks, commonly stored in source
control. Ansible Tower lets you manage your playbook collection and assign who
can run which playbooks.

Step 1: Step 2: Step 3: Step 4:

Click the Project link at the top Upon arriving to the new Select the source for this Once you have declared the
of your Tower instance and project page, name the project project, whether that be source, you can select Clean,
select the +Add button. and select which organization locally or through an SCM. Delete on Update and Update
within your instance will be on Launch from the SCM
using this project. update options. Once you
Note: The base path where
projects are stored is /var/lib/ have the correct source and
awx/projects. you have selected the options
you need, hit the save button
and you will be returned to
the Projects page with your
new project listed.

For more information on Ansible Tower Projects and Inventories visit our Getting Started series.

Configuring Ansible Tower 19


Creating a Job Template steps 1-4
Job templates are definitions and a set of parameters for running an Ansible
Playbook. Job templates are linked together using a graph-like structure called
nodes. Each node represents a single job template and the workflow can be set up
in many ways to allow the maximization of each template.

Step 1:
Step 2: Step 3:
Select Templates from the top of the
The first two options that need to be added Select the inventory you want to use for
screen next to Inventories. This will
to the template are Name and Job Type. your job template.
bring you to the templates screen
There are two available choices:
with all of your current options from
Step 4:
which you can select. From here,
Check performs a “dry run” of the Choose the project, keeping in mind that
navigate to the Add drop-down box
playbook and reports changes that would the project you select will dictate which
and select Job Template.
be made without actually making them. playbook you can select.

Run executes the tasks in the playbook Note: Ansible Tower will not display the full file
on the selected hosts. Depending on what name. For example, if the file name for your
the playbook does, this will determine the playbook is AWS.yml, Ansible Tower will display
type of job that needs to be selected. it as AWS.

Continue to next page to complete Creating a Job Template

Configuring Ansible Tower 20


Creating a Job Template steps 5-7

Step 5:
Step 6: Step 7:
Select the credentials to save the job
Select the Forks, Limits and Verbosity You can also set a few other additional
template. The most important option
levels. options, such as job tags and skip tags.
is the Machine Credential. The other
More information about additional tags
three options are:
Forks: the number of parallel or that can be set can be found in the Job
· Vault simultaneous processes in use while Templates documentation page.
· Cloud executing the playbook.
· Network
Limits: host patterns to further
Depending on what you are constrain the job template’s targeted
managing with this template, you hosts.
might need either a cloud credential
or a network credential. Verbosity: allows you to control
the amount of data returned in the
playbook run.

For more information on Setting Up a Job Template visit our Getting Started series.

Configuring Ansible Tower 21


KEY TAKEAWAYS

1. Configuring Ansible Tower is easy


Creating users and setting up permissions
using the Ansible Tower UI is straightforward
and intuitive. Are you ready to scale automation,
manage complex deployments and
2. Organization is key speed up productivity?
You can organize your projects visually into job
templates, customizing each job to have the
most efficient workflow.
DOWNLOAD A FREE TOWER TRIAL

ANSIBLE DOCUMENTATION

Configuring Ansible Tower


ANSIBLE GALAXY Ansible Galaxy gives you access to
thousands of user-contributed roles,
playbooks, and modules.
Galaxy Roles
A role is Ansible’s way of bundling automation content and making it reusable.
Instead of creating giant playbooks with hundreds of tasks, we can use roles to
organize tasks, breaking them apart into smaller, more discrete units of work. A role
is also all the tasks, variables and handlers needed to complete the unit of work.

Downloading Roles Create and Share

You can find the most popular roles on the Galaxy home Roles can be used for automating a wide variety of
page, or you can use the search tool to search for all tasks, anything from the steps in your CI/CD workflow
available roles. to packaging and distributing a product your company
makes.
Download a role using the ansible-galaxy command that
comes bundled with Ansible (e.g., ansible-galaxy install Once you finish development, push your changes to
username.rolename). GitHub by running the following from within the project
directory:
$ git commit -a
$ git push

You will see a list of your GitHub repositories in Galaxy.


If you don’t see them at first, simply refresh.

Ansible Galaxy 24
KEY TAKEAWAYS

1. Jump-start your automation project


Ansible Galaxy gives you access to user-
contributed roles, playbooks, and modules.
Are you ready to scale automation,
manage complex deployments and
2. Automate through sharing
Create roles and share them so other people speed up productivity?
can use them to automate a wide variety
of tasks.

DOWNLOAD A FREE TOWER TRIAL

ANSIBLE DOCUMENTATION

Latest Playbooks, Roles and Modules


LAUNCH IT!
Now that you’ve used Ansible, written
playbooks and installed and configured
Ansible Tower, you’re ready to scale your
enterprise, manage complex deployments,
and speed productivity.

You might also like