About the Author |
|
xi | |
About the Technical Reviewer |
|
xiii | |
Introduction |
|
xv | |
Chapter 1 Understanding Ansible and the Red Hat RHCE |
|
1 | (10) |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (4) |
|
Installing Ansible on CentOS 8 |
|
|
5 | (2) |
|
Installing Ansible on Ubuntu 18.04 |
|
|
7 | (1) |
|
|
8 | (3) |
Chapter 2 Working with the Ansible Configuration |
|
11 | (18) |
|
Ansible Configuration Hierarchy |
|
|
12 | (14) |
|
Printing the Ansible Configuration |
|
|
18 | (5) |
|
Creating a Basic Ansible Configuration File |
|
|
23 | (3) |
|
|
26 | (3) |
Chapter 3 Creating an Ansible Inventory |
|
29 | (18) |
|
|
30 | (2) |
|
|
32 | (3) |
|
Listing Inventory Hosts Using Ansible |
|
|
33 | (2) |
|
Listing Hosts Using Ansible-Inventory |
|
|
35 | (4) |
|
Adding Host and Group Entries |
|
|
38 | (1) |
|
Discovering Hosts on Your Network |
|
|
39 | (3) |
|
|
42 | (3) |
|
|
45 | (2) |
Chapter 4 Using Ad Hoc Commands and Ansible Preparation |
|
47 | (16) |
|
|
48 | (5) |
|
Implementing Ansible Inventory Groups |
|
|
53 | (6) |
|
Preparing the User Account for Ansible |
|
|
55 | (1) |
|
|
55 | (1) |
|
Allowing Passwordless Sudo Access |
|
|
56 | (1) |
|
|
57 | (1) |
|
Configuring the Final Changes |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
60 | (3) |
Chapter 5 Writing YAML and Basic Playbooks |
|
63 | (16) |
|
Writing Simple YAML Playbooks |
|
|
64 | (8) |
|
|
64 | (1) |
|
|
65 | (4) |
|
Extending the Playbook Using Facts |
|
|
69 | (2) |
|
Installing Multiple Packages |
|
|
71 | (1) |
|
|
72 | (3) |
|
|
75 | (1) |
|
|
76 | (3) |
Chapter 6 Managing Users with Ansible Playbooks |
|
79 | (22) |
|
|
80 | (7) |
|
|
80 | (1) |
|
Creating a Consistent User Account |
|
|
81 | (2) |
|
Using an Ansible Loop Control |
|
|
83 | (2) |
|
|
85 | (1) |
|
Using Variables and Logic with Playbooks |
|
|
86 | (1) |
|
|
87 | (5) |
|
|
87 | (2) |
|
|
89 | (1) |
|
Generating Passwords in Playbooks |
|
|
90 | (2) |
|
Using a Playbook to Create Managed Host Setup |
|
|
92 | (8) |
|
|
100 | (1) |
Chapter 7 Working with Variables and Facts |
|
101 | (12) |
|
|
101 | (1) |
|
|
102 | (1) |
|
|
103 | (5) |
|
|
108 | (3) |
|
|
111 | (2) |
Chapter 8 Working with Files and Templates |
|
113 | (10) |
|
|
113 | (4) |
|
|
114 | (1) |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
117 | (3) |
|
|
120 | (1) |
|
|
121 | (2) |
Chapter 9 Managing Services Using Ansible |
|
123 | (12) |
|
|
124 | (1) |
|
|
124 | (2) |
|
|
126 | (3) |
|
Ensure SSHD Started and Enabled |
|
|
128 | (1) |
|
|
128 | (1) |
|
The Handler: restart_sshd |
|
|
128 | (1) |
|
Handlers Do Not Run when They Are Not Notified |
|
|
129 | (1) |
|
|
129 | (3) |
|
|
132 | (3) |
Chapter 10 Securing Sensitive Data with Ansible Vault |
|
135 | (8) |
|
Creating an External Variables File |
|
|
136 | (2) |
|
Encrypt Existing YAML File |
|
|
138 | (1) |
|
Creating New Encrypted Files |
|
|
139 | (2) |
|
|
141 | (1) |
|
|
142 | (1) |
Chapter 11 Implementing a Full Apache Deployment |
|
143 | (18) |
|
|
143 | (9) |
|
|
145 | (1) |
|
|
146 | (1) |
|
|
147 | (3) |
|
The Apache Configuration File |
|
|
150 | (2) |
|
Configure Filesystem Security |
|
|
152 | (3) |
|
|
155 | (3) |
|
|
158 | (3) |
Chapter 12 Simplifying Playbooks Using Roles |
|
161 | (14) |
|
|
161 | (2) |
|
|
163 | (10) |
|
Populating the Firewall Role |
|
|
164 | (2) |
|
Updating the Apache Playbook |
|
|
166 | (1) |
|
Configure Role for Web Content |
|
|
167 | (3) |
|
|
170 | (3) |
|
|
173 | (1) |
|
|
173 | (2) |
Chapter 13 Downloading Roles |
|
175 | (20) |
|
|
175 | (2) |
|
Searching Roles From the CLI |
|
|
176 | (1) |
|
|
177 | (10) |
|
Investigating PHP Role and Learning Better Coding |
|
|
177 | (4) |
|
|
181 | (2) |
|
|
183 | (2) |
|
Code Blocks and Extra Configuration for Ubuntu |
|
|
185 | (2) |
|
Install the Database Role |
|
|
187 | (5) |
|
|
187 | (1) |
|
Installing the MySQL Role and Implementing a Database Server |
|
|
188 | (2) |
|
Opening MySQL Firewall Port |
|
|
190 | (2) |
|
|
192 | (3) |
Chapter 14 Configuring Storage with Ansible |
|
195 | (22) |
|
|
196 | (2) |
|
Creating Loopback Devices |
|
|
196 | (2) |
|
Partitioning Disks and Mounting Filesystems |
|
|
198 | (3) |
|
|
201 | (2) |
|
Managing VDO with Ansible |
|
|
203 | (7) |
|
|
203 | (3) |
|
|
206 | (1) |
|
|
207 | (3) |
|
|
210 | (1) |
|
Maintenance of Filesystems |
|
|
211 | (4) |
|
|
215 | (2) |
Chapter 15 Managing Scheduled Tasks with Ansible |
|
217 | (6) |
|
Ad Hoc Linux Jobs with ATD |
|
|
217 | (3) |
|
Creating the Ansible Role to Manage ATD |
|
|
218 | (1) |
|
Playbook to Create Jobs in At |
|
|
218 | (2) |
|
Creating Regular Jobs with Cron |
|
|
220 | (1) |
|
|
221 | (2) |
Index |
|
223 | |