Book Image

Learn Ansible

By : Russ McKendrick
Book Image

Learn Ansible

By: Russ McKendrick

Overview of this book

Ansible has grown from a small, open source orchestration tool to a full-blown orchestration and configuration management tool owned by Red Hat. Its powerful core modules cover a wide range of infrastructures, including on-premises systems and public clouds, operating systems, devices, and services—meaning it can be used to manage pretty much your entire end-to-end environment. Trends and surveys say that Ansible is the first choice of tool among system administrators as it is so easy to use. This end-to-end, practical guide will take you on a learning curve from beginner to pro. You'll start by installing and configuring the Ansible to perform various automation tasks. Then, we'll dive deep into the various facets of infrastructure, such as cloud, compute and network infrastructure along with security. By the end of this book, you'll have an end-to-end understanding of Ansible and how you can apply it to your own environments.
Table of Contents (20 chapters)

To get the most out of this book

To get the most out of this book, I assume you that you:

  • Have had some experience of using the command line on both Linux-based machines and also macOS
  • Have a basic understanding of how to install and configure services on a Linux server
  • Have a working knowledge of services and languages, such as Git, YAML, and virtualization

Download the example code files

You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Learn-Ansible. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "This will create a key and store it in the .ssh folder in your user directory."

A block of code is set as follows:

  config.vm.provider "virtualbox" do |v|
v.memory = "2024"
v.cpus = "2"
end

Any command-line input or output is written as follows:

$ sudo -H apt-get install python-pip
$ sudo -H pip install ansible

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "To do this, open Control Panel, then click on Programs and Features, and then on Turn Windows features on or off."

Warnings or important notes appear like this.
Tips and tricks appear like this.