Book Image

Hands-On Enterprise Automation on Linux

By : James Freeman
Book Image

Hands-On Enterprise Automation on Linux

By: James Freeman

Overview of this book

Automation is paramount if you want to run Linux in your enterprise effectively. It helps you minimize costs by reducing manual operations, ensuring compliance across data centers, and accelerating deployments for your cloud infrastructures. Complete with detailed explanations, practical examples, and self-assessment questions, this book will teach you how to manage your Linux estate and leverage Ansible to achieve effective levels of automation. You'll learn important concepts on standard operating environments that lend themselves to automation, and then build on this knowledge by applying Ansible to achieve standardization throughout your Linux environments. By the end of this Linux automation book, you'll be able to build, deploy, and manage an entire estate of Linux servers with higher reliability and lower overheads than ever before.
Table of Contents (23 chapters)
1
Section 1: Core Concepts
5
Section 2: Standardizing Your Linux Servers
10
Section 3: Day-to-Day Management
16
Section 4: Securing Your Linux Servers

Running one-off tasks with Ansible

In the previous chapter, we used the ansible webservers -i cobbler.py -m ping command to test connectivity to all of the servers in the webservers group of our dynamic inventory. This type of Ansible command is known as an ad hoc command, and it is typically used to run a single Ansible module against an inventory, with a set of parameters.

Throughout this book, we have encouraged the use of full playbooks and roles for all Ansible tasksand for good reason! If you frequently run commands without storing the code in some shape or form, it will soon become very difficult, if not impossible, to know who ran what and when they ran it. Indeed, if you have looked into AWX/Ansible Tower, you will see that it does not even support ad hoc Ansible commandsrunning them is not aligned with the principles of auditability and role-based access...