© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
A. MallettRed Hat Certified Engineer (RHCE) Study Guidehttps://doi.org/10.1007/978-1-4842-6861-2_7

7. Working with Variables and Facts

Andrew Mallett1  
(1)
Peterborough, UK
 

We have already touched upon both variables and facts with previous examples that we have used and learned. In this chapter we can really consolidate that knowledge by investigating facts that can be collected or gathered on managed devices. That includes retrieving items such as the IP address, hostname, and fully qualified domain name. The previous are all facts that can be used as variables in the Playbook, either in clauses to control execution or as values to keys. We will extend the ...

Get Red Hat Certified Engineer (RHCE) Study Guide: Ansible Automation for the Red Hat Enterprise Linux 8 Exam (EX294) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.