What are the main keys of a play?
BeginnerConceptPlaybooks, Plays, Tasks and Handlers
Answer
name— description shown in outputhosts— pattern of target hosts (required)become,become_user,remote_user,connectionvars,vars_files,vars_prompt,environmentgather_facts,serial,strategy,any_errors_fatalpre_tasks,roles,tasks,post_tasks,handlers
Play-level keywords act as defaults that individual tasks and blocks can override.
More on Playbooks, Plays, Tasks and Handlers
What is a playbook?BeginnerWhy should every task have a `name`?BeginnerWhich playbook flags help you inspect and debug before a real run?BeginnerWhat is a handler and how is it triggered?BeginnerWhat are the behaviours and gotchas of handlers?IntermediateHow do you run handlers immediately instead of at the end of the play?Intermediate