Review questions

Do you think you've understood the chapter well enough? Try answering the following questions to test your understanding:

  1. How are Jinja2 templates different from static files?
  2. What are facts? How are they discovered?
  3. What is the difference between {{ }} and {% %} in the context of Jinja2 templates?
  4. Can you use a variable anywhere apart from templates? If yes, where?
  5. If you define a variable foo in the vars directory in a role and the same variable in the hosts_var file, which of these will take precedence?
  6. How do you write Ansible roles that are supported on multiple platforms?
  7. Where can you specify the author and licensing information in a role?
  8. How do you provide variables while launching an Ansible-playbook command?
  9. Which command would ...

Get Ansible Playbook Essentials 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.