DevOps · Flashcard

What is a role in Ansible?

  • AA reusable, self-contained bundle of tasks, variables, handlers and templates
  • BA single action within a play that calls one module with its arguments
  • CA group of hosts in the inventory that all share the same variables
  • DA public website for sharing community content across the Ansible world

Why this is the answer

A role packages tasks, variables, handlers, templates and files for reuse. Not a single task, not an inventory group, and not Galaxy (the sharing site).

Official docs
Study in Gnoseed →