In what order are the parts of a play executed?
IntermediateConceptFundamentals and Architecture
Answer
Within one play, in this order regardless of how they appear in the file:
pre_tasks- Handlers notified by pre_tasks
roles(andtasksthat import roles)tasks- Handlers notified by roles/tasks
post_tasks- Handlers notified by post_tasks
Role dependencies in meta/main.yml run before the role that depends on them. Facts are gathered before everything, as an implicit first step.
More on Fundamentals and Architecture
What is Ansible and what problem does it solve?BeginnerWhat does "agentless" mean in Ansible?BeginnerWhat are the requirements for the control node?BeginnerWhat does a managed node need?BeginnerIs Ansible push-based or pull-based?BeginnerWalk through what happens when you run `ansible-playbook site.yml`.Intermediate