Red Hat Certified Engineer (RHCE) Study Guide: Ansible Automation for the Red Hat Enterprise Linux 8 Exam (EX294)

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Study the material in this book to prepare for the RHCE exam EX294 and to learn how using Ansible within your own environment improves system administration productivity. This book covers all of the objectives of the exam and extends further, ensuring that you know how to use Ansible to manage Linux. The book uses CentOS, a Red Hat-based distribution, and Ubuntu instead of using a single Red Hat distribution. By using the two distributions, you will understand the power of Ansible and how easily you can deal with multiple platforms, which is crucial for your understanding of Ansible in the real world. The book assumes no previous knowledge of Ansible but some knowledge of Linux system administration from the command line. You will learn how to manage Linux systems that are installed with different distributions, including CentOS Enterprise Linux 8 and Ubuntu 18.04. You will be able to manage these systems using ad hoc commands from the command line as well as creating Ansible playbooks that can be replayed reliably many times. To save on the code that you have to create, you will learn how to use Ansible Galaxy to search for and download roles and collections that are pre-written to manage elements of your Linux installations. By the end of this book, you will be able to write efficient and effective YAML playbooks to manage your entire estate. What You Will Learn • Prepare systems so that password-less access can be used with Ansible remotely • Use ad hoc commands to quickly configure systems • Use and format YAML files correctly • Create playbooks that grow in their complexity as your experience develops • Ensure that services are restarted on configuration changes Who This Book Is For Those who want to prepare for the RHCE exam EX294 and readers who want to learn how to use Ansible to improve the productivity of their system administration. This book will help you prepare yourself for the exam as well as your real-life administration needs.

Author(s): Andrew Mallett
Edition: 1
Publisher: Apress
Year: 2021

Language: English
Commentary: Vector PDF
Pages: 232
City: New York, NY
Tags: Linux; Security; Deployment; Networking; YAML; Ansible

Table of Contents
About the Author
About the Technical Reviewer
Introduction
Chapter 1: Understanding Ansible and the Red Hat RHCE
Red Hat and Ansible
Red Hat Certifications
RHCSA
RHCE
Lab Systems
Installing Ansible on CentOS 8
Installing Ansible on Ubuntu 18.04
Summary
Chapter 2: Working with the Ansible Configuration
Ansible Configuration Hierarchy
Printing the Ansible Configuration
Creating a Basic Ansible Configuration File
Summary
Chapter 3: Creating an Ansible Inventory
Creating an Inventory
Query Inventory Entries
Listing Inventory Hosts Using Ansible
Listing Hosts Using Ansible-Inventory
Adding Host and Group Entries
Discovering Hosts on Your Network
Inventory Variables
Summary
Chapter 4: Using Ad Hoc Commands and Ansible Preparation
Testing Ansible
Implementing Ansible Inventory Groups
Preparing the User Account for Ansible
Creating the User
Allowing Passwordless Sudo Access
SSH-Key Authentication
Configuring the Final Changes
Gaining Help on Modules
Summary
Chapter 5: Writing YAML and Basic Playbooks
Writing Simple YAML Playbooks
Elements of a Playbook
Our First Playbook
Extending the Playbook Using Facts
Installing Multiple Packages
Improving Text Editors
Going All GUI
Summary
Chapter 6: Managing Users with Ansible Playbooks
Playbook to Manage Users
User Module Help
Creating a Consistent User Account
Using an Ansible Loop Control
Deleting Users
Using Variables and Logic with Playbooks
Managing User Passwords
Password Elements
Authenticating Users
Generating Passwords in Playbooks
Using a Playbook to Create Managed Host Setup
Summary
Chapter 7: Working with Variables and Facts
Gathering Facts
Printing OS Information
Upgrading Systems
Installing Apache
Summary
Chapter 8: Working with Files and Templates
The Copy Module
Using SRC
Content Is King
Differing Fold Operators
Editing Files in Place
Using Templates
Summary
Chapter 9: Managing Services Using Ansible
The Service Module
The Systemd Module
Using Ansible Handlers
Ensure SSHD Started and Enabled
Edit SSHD Config
The Handler: restart_sshd
Handlers Do Not Run when They Are Not Notified
Service Facts
Summary
Chapter 10: Securing Sensitive Data with Ansible Vault
Creating an External Variables File
Encrypt Existing YAML File
Creating New Encrypted Files
Read Vault Password
Summary
Chapter 11: Implementing a Full Apache Deployment
Deploying Apache
Apache Playbook
Dedicated Server Page
All About Firewalls
The Apache Configuration File
Configure Filesystem Security
Full Apache Playbook
Summary
Chapter 12: Simplifying Playbooks Using Roles
Understanding Roles
Creating Firewall Role
Populating the Firewall Role
Updating the Apache Playbook
Configure Role for Web Content
Creating the Apache Role
Execution Order
Summary
Chapter 13: Downloading Roles
Roles and Collections
Searching Roles From the CLI
Installing the PHP Role
Investigating PHP Role and Learning Better Coding
Installing PHP
Adding Extra PHP Modules
Code Blocks and Extra Configuration for Ubuntu
Install the Database Role
Create Variable File
Installing the MySQL Role and Implementing a Database Server
Opening MySQL Firewall Port
Summary
Chapter 14: Configuring Storage with Ansible
Block Devices
Creating Loopback Devices
Partitioning Disks and Mounting Filesystems
Managing Logical Volumes
Managing VDO with Ansible
Updating a Managed Host
Updating the Controller
Deploying VDO
Archiving Files
Maintenance of Filesystems
Summary
Chapter 15: Managing Scheduled Tasks with Ansible
Ad Hoc Linux Jobs with ATD
Creating the Ansible Role to Manage ATD
Playbook to Create Jobs in At
Creating Regular Jobs with Cron
Summary
Index