Bookmark this page

Summary

In this chapter, you learned:

  • Ansible variables allow administrators to reuse values across files in an entire Ansible project.

  • Variables can be defined for hosts and host groups in the inventory file.

  • Variables can be defined for playbooks by using facts and external files. They can also be defined on the command line.

  • The register keyword can be used to capture the output of a command in a variable.

  • Ansible Vault is one way to protect sensitive data such as password hashes and private keys for deployment using Ansible Playbooks.

  • Ansible facts are variables that are automatically discovered by Ansible from a managed host.

Revision: rh294-8.4-9cb53f0