Home > Store

Red Hat RHCE 8 (EX294) Cert Guide

eBook (Watermarked)

  • Your Price: $34.39
  • List Price: $42.99
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Acrobat® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

Also available in other formats.

Register your product to gain access to bonus material or receive a coupon.


  • Copyright 2021
  • Edition: 1st
  • eBook (Watermarked)
  • ISBN-10: 0-13-687253-0
  • ISBN-13: 978-0-13-687253-5

This is the eBook version of the print title. Access to the personal video mentoring is available through product registration at Pearson IT Certification, or see the instructions in the back pages of your eBook.

Learn, prepare, and practice for Red Hat RHCE 8 EX294 exam success with this Cert Guide from Pearson IT Certification, a leader in IT certification learning.
* Master RHCE 8 EX294 exam topics
* Assess your knowledge with chapter-ending quizzes
* Review key concepts with step-by-step exercises, code examples, and complete labs after every chapter, designed to closely resemble the exam
* Practice with realistic exam questions from four full practice exams: two printed in the book and two more on the companion website
* Supplement your learning with an hour of video mentoring

Red Hat RHCE 8 (EX294) Cert Guide is the authoritative exam study guide. Leading Red Hat and Linux consultant, trainer, and author Sander van Vugt walks you through the RHCE EX 294 objectives so you have a full study resource. He shares preparation hints and test-taking tips, helping you identify areas of weakness and improve both your conceptual knowledge and hands-on skills. Material is presented in a concise manner, focusing on increasing your understanding, retention of exam topics, and hands-on practice so you can feel ready to take the exam.

The book presents you with an organized test preparation routine through the use of proven series elements and techniques. Exam topic lists make referencing easy. Chapter-ending Exam Preparation Tasks help you drill on key concepts you must know thoroughly. Review questions help you assess your knowledge, and a final preparation chapter guides you through tools and resources to help you craft your final study plan. The end of chapter labs are an essential part of learning each topic and cover each chapter's key concepts so you can test yourself and put your knowledge to work.

The companion website contains two additional practice exams, flashcards that test you on the glossary terms in the book, an hour of video mentoring from the author, and study resources.

Well regarded for its level of detail, assessment features, and challenging review questions and exercises, this study guide helps you master the concepts and techniques that will enable you to succeed on the exam the first time.

The study guide helps you master all the topics on the RHCE 8 exam, including

* Understanding configuration management
* Installing Ansible and setting up managed environments
* Using ad hoc commands
* Getting started with playbooks
* Working with variables and facts
* Using task control
* Deploying files
* Using Ansible roles
* Using Ansible in large environments
* Troubleshooting Ansible
* Managing software with Ansible
* Managing users, processes, tasks, and storage

Sample Content

Sample Pages

Download the sample pages (includes Chapter 8)

Table of Contents

Introduction xxii
Part I: Introduction to Ansible
Chapter 1
Understanding Configuration Management 3
Do I Know This Already? Quiz 3
Foundation Topics 6
Understanding Automation 6
    What Is Automation? 6
    Understanding the DevOps Way of Working 7
    Understanding Infrastructure as Code 8
    Other Automation Solutions 8
Understanding Ansible Essential Components 9
    Ansible Is Python 9
    Ansible Architecture 9
    Understanding Ansible Tower 10
    Understanding the Ansible Way 11
Understanding Ansible Use Cases 11
    Using Ansible for Configuration Management 11
    Using Ansible for Provisioning 12
    Using Ansible for Continuous Delivery 12
Summary 12
Exam Preparation Tasks 12
Review All Key Topics 12
Define Key Terms 13
Chapter 2 Installing Ansible 15
Do I Know This Already? Quiz 15
Foundation Topics 18
Understanding an Ansible Environment 18
Understanding Controller Host Requirements 20
Understanding Installation Methods 20
    Installing Ansible on RHEL 8 21
    Installing Ansible on CentOS 8 21
    Using python-pip to Install Ansible 21
Configuring Managed Hosts 22
Configuring the Ansible User 23
    Setting Up SSH for the Ansible User 23
    Configuring sudo for the Ansible User 25
Summary 26
Exam Preparation Tasks 26
Review All Key Topics 26
Memory Tables 27
Define Key Terms 27
Review Questions 27
End-of-Chapter Lab 28
Chapter 3 Setting Up an Ansible Managed Environment 31
Do I Know This Already? Quiz 31
Foundation Topics 34
Understanding Projects 34
Configuring Static Inventory 35
    Listing Hosts 35
    Inventory Host Groups 36
    Using Inventory in Commands 37
    Specifying Host Variables 38
Working with Dynamic Inventory 39
    Working with Community-Provided Dynamic Inventory Scripts 39
    Writing Your Own Inventory Scripts 40
    Using Multiple Inventory Files 42
Managing Settings in ansible.cfg 42
Summary 44
Exam Preparation Tasks 44
Review All Key Topics 44
Memory Tables 44
Define Key Terms 44
Review Questions 45
End-of-Chapter Lab 45
Chapter 4 Using Ad Hoc Commands 47
Do I Know This Already? Quiz 47
Foundation Topics 50
Understanding Ad Hoc Commands 50
Working with Modules 53
    Exploring Essential Modules 54
        command 54
        shell 55
        raw 55
        copy 55
        yum 56
        service 56
        ping 56
    Browsing Available Modules 58
Consulting Module Documentation 58
    Using ansible-doc 58
    Using https://docs.ansible.com 62
Running Ad Hoc Commands from Shell Scripts 64
Summary 66
Exam Preparation Tasks 66
Review All Key Topics 66
Memory Tables 66
Define Key Terms 66
Review Questions 67
End-of-Chapter Lab 67
Chapter 5 Getting Started with Playbooks 69
Do I Know This Already? Quiz 69
Foundation Topics 72
Exploring Your First Playbook 72
    From Ad Hoc Commands to Playbook 72
    Playbook Elements 73
    Running the Playbook 74
    Undoing Playbook Modifications 75
Working with YAML 77
    Indentation 77
    Using Key-Value Pairs 78
    Understanding YAML Lists 79
    Using YAML Strings 79
    Verifying Syntax 80
    Performing a Playbook Dry Run 81
Managing Multiplay Playbooks 83
    Multiplay Playbook Considerations 83
    Multiplay Playbook Example 84
    Increasing Output Verbosity 86
Summary 92
Exam Preparation Tasks 92
Review All Key Topics 93
Memory Tables 93
Define Key Terms 93
Review Questions 93
End-of-Chapter Lab 94
Chapter 6 Working with Variables and Facts 97
Do I Know This Already? Quiz 97
Foundation Topics 100
Understanding the Use of Variables in Ansible Playbooks 100
Working with Ansible Facts 101
    Gathering Facts 102
    Understanding How Facts Are Displayed 104
    Managing Fact Gathering 108
    Working with Custom Facts 109
Working with Variables 111
    Defining Variables 112
    Using Include Files 112
    Managing Host and Group Variables 113
    Using Multivalued Variables 115
    Working with Magic Variables 117
    Understanding Variable Precedence 119
Using Vault to Manage Sensitive Values 119
    Understanding Vault 119
    Managing Encrypted Files 120
    Using Vault in Playbooks 120
    Managing Files with Sensitive Variables 121
Capturing Command Output Using register 122
Summary 125
Exam Preparation Tasks 125
Review All Key Topics 125
Memory Tables 125
Define Key Terms 126
Review Questions 126
End-of-Chapter Labs 126
Part II: Common Ansible Management Tasks
Chapter 7
Using Task Control 131
Do I Know This Already? Quiz 131
Foundation Topics 134
Using Loops and Items 134
    Working with Loops 134
    Using Loops on Variables 135
    Using Loops on Multivalued Variables 136
    Understanding with_items 137
Using when to Run Tasks Conditionally 139
    Working with when 139
    Using Conditional Test Statements 141
    Testing Multiple Conditions 144
    Combining loop and when 145
    Combining loop and register 147
Using Handlers 149
    Working with Handlers 149
    Understanding Handler Execution and Exceptions 154
Dealing with Failures 156
    Understanding Task Execution 156
    Managing Task Errors 156
    Specifying Task Failure Conditions 158
    Managing Changed Status 161
    Using Blocks 163
    Using Blocks with rescue and always Statements 164
Summary 169
Exam Preparation Tasks 169
Review All Key Topics 169
Memory Tables 170
Define Key Terms 170
Review Questions 170
End-of-Chapter Lab 171
Chapter 8 Deploying Files 173
Do I Know This Already? Quiz 173
Foundation Topics 176
Using Modules to Manipulate Files 176
    File Module Manipulation Overview 176
    Managing File Attributes 176
    Managing File Contents 180
    Creating and Removing Files 182
    Moving Files Around 183
Managing SELinux Properties 187
    Managing SELinux File Context 188
    Applying Generic SELinux Management Tasks 189
Using Jinja2 Templates 194
    Working with Simple Templates 194
    Applying Control Structures in Jinja2 Using for 197
    Using Conditional Statements with if 198
    Using Filters 198
Summary 200
Exam Preparation Tasks 200
Review All Key Topics 200
Memory Tables 201
Define Key Terms 201
Review Questions 201
Exercise Answers 201
End-of-Chapter Labs 202
Chapter 9 Using Ansible Roles 205
Do I Know This Already? Quiz 205
Foundation Topics 208
Using Ansible Roles 208
    Understanding Ansible Roles 208
    Understanding Role Location 209
    Using Roles from Playbooks 210
    Creating Custom Roles 210
    Managing Role Dependencies 213
    Understanding File Organization Best Practices 213
Using Ansible Galaxy Roles 214
    Working with Galaxy 215
    Using the ansible-galaxy Command 216
    Managing Ansible Galaxy Roles 218
Using RHEL System Roles 219
    Understanding RHEL System Roles 220
    Installing RHEL System Roles 220
    Using the RHEL SELinux System Role 221
    Using the RHEL TimeSync System Role 224
Summary 225
Exam Preparation Tasks 225
Review All Key Topics 226
Memory Tables 226
Define Key Terms 226
Review Questions 226
End-of-Chapter Labs 227
Chapter 10 Using Ansible in Large Environments 229
Do I Know This Already? Quiz 229
Foundation Topics 232
Advanced Inventory Usage 232
    Working with Host Name Patterns 232
    Configuring Dynamic Inventory 233
    Using the ansible-inventory Command 235
    Working with Multiple Inventory Files 236
Optimizing Ansible Processing 237
    Managing Parallel Task Execution 237
    Managing Serial Task Execution 238
Including and Importing Files 239
    Importing Playbooks 240
    Importing and Including Task Files 242
    Using Variables When Importing and Including Files 243
Summary 247
Exam Preparation Tasks 247
Review All Key Topics 248
Define Key Terms 248
Review Questions 248
End-of-Chapter Lab 249
Chapter 11 Troubleshooting Ansible 251
Do I Know this Already? Quiz 251
Foundation Topics 254
Managing Ansible Errors and Logs 254
    Using Check Mode 254
    Understanding Output 256
    Optimizing Command Output Error Formatting 259
    Logging to Files 259
    Running Task by Task 260
Using Modules for Troubleshooting and Testing 263
    Using the Debug Module 263
    Using the uri Module 263
    Using the stat Module 265
    Using the assert Module 268
Using Tags 271
Troubleshooting Common Scenarios 275
    Analyzing Connectivity Issues 275
    Analyzing Authentication Issues 276
Summary 277
Exam Preparation Tasks 277
Review All Key Topics 278
Memory Tables 278
Define Key Terms 278
Review Questions 278
End-of-Chapter Lab 279
Part III: Managing Systems with Ansible
Chapter 12
Managing Software with Ansible 281
Do I Know This Already? Quiz 281
Foundation Topics 284
Using Modules to Manage Packages 284
    Configuring Repository Access 284
    Managing Software with yum 285
    Managing Package Facts 287
Using Modules to Manage Repositories and Subscriptions 289
    Setting Up Repositories 290
    Managing GPG Keys 291
    Managing RHEL Subscriptions 292
Implementing a Playbook to Manage Software 297
Summary 301
Exam Preparation Tasks 302
Review All Key Topics 302
Memory Tables 302
Define Key Terms 302
Review Questions 302
End-of-Chapter Labs 303
Chapter 13 Managing Users 305
Do I Know This Already? Quiz 305
Foundation Topics 308
Using Ansible Modules to Manage Users and Groups 308
    Modules Overview 308
    Managing Users and Groups 308
    Managing sudo 309
Managing SSH Connections 313
    Understanding SSH Connection Management Requirements 313
    Using the Lookup Plug-in 314
    Setting Up SSH User Keys 314
Managing Encrypted Passwords 319
    Understanding Encrypted Passwords 319
    Generating Encrypted Passwords 319
    Using an Alternative Approach 321
Managing Users Advanced Scenario Exercise 323
Summary 329
Exam Preparation Tasks 330
Review All Key Topics 330
Memory Tables 330
Define Key Terms 330
Review Questions 330
End-of-Chapter Lab 331
Chapter 14 Managing Services and the Boot Process 333
Do I Know This Already? Quiz 333
Foundation Topics 336
Managing Services 336
    Managing Systemd Services 336
    Managing cron Jobs 337
    Managing at Jobs 338
Managing the Boot Process 341
    Managing Systemd Targets 341
    Rebooting Managed Hosts 342
Managing the Boot Process and Services Advanced Exercise 344
Summary 346
Exam Preparation Tasks 346
Review All Key Topics 346
Memory Tables 347
Define Key Terms 347
Review Questions 347
End-of-Chapter Lab 348
Chapter 15 Managing Storage 351
Do I Know This Already? Quiz 351
Foundation Topics 354
Discovering Storage-Related Facts 354
    Using Storage-Related Facts 354
    Using Storage-Related Facts in Conditional Statements 357
Managing Partitions and LVM 364
    Creating Partitions 364
    Managing Volume Groups and LVM Logical Volumes 366
    Creating and Mounting File Systems 367
    Configuring Swap Space 368
Configuring Storage Advanced Exercise 371
Summary 379
Exam Preparation Tasks 380
Review All Key Topics 380
Memory Tables 380
Define Key Terms 380
Review Questions 380
End-of-Chapter Lab 381
Chapter 16 Final Preparation 383
Generic Tips 383
    Verifying Your Readiness 383
    Registering for the Exam 384
    On Exam Day 384
        During the Exam 385
        The Nondisclosure Agreement 386
Part IV: Practice Exams
Practice Exam A 387
Practice Exam B 391
Part V: Appendixes
Appendix A Answers to the Do I Know This Already? Quizzes and Review Questions 395
Appendix B Getting Started with Ansible Tower 415
Appendix C Red Hat RHCE 8 (EX294) Cert Guide Exam Updates 431
Glossary 433

Online Elements:
Practice Exam C
Practice Exam D
Appendix D Memory Tables
Appendix E Memory Tables Answer Key
Appendix F Study Planner

9780136872436   TOC   8/25/2020


Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020