From the course: Ansible: From Basics to Guru by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Learning objectives

Learning objectives

Hello and welcome to Working with Variables. In this lesson you'll learn all you need to know about variables and facts. We'll start with a generic video that explains how variables can help in separating code from site-specific playbooks, which helps you in developing portable playbooks. The next video is about using variables in a playbook, after which you'll find a video explaining where to define your variables. Then you learn about facts, which are system properties that are automatically discovered while running Ansible playbooks. Once you know about facts, we'll talk about the different ways that facts can be written. And after that, you'll learn how dictionaries and arrays can be used in composing multivalued variables. Next, you'll find videos about magic variables, register, and Ansible Vault, which allows for storing sensitive information. Like most lessons in this course, at the end of this lesson, you'll find a lab It helps you practice using variables.

Contents