--- # Two entry points, so a playbook that must do maintenance between the payload # landing and the stack starting can interleave its own tasks: # # - ansible.builtin.include_role: # name: compose_stack # tasks_from: sync # - name: Run the database migration # ... # - ansible.builtin.include_role: # name: compose_stack # tasks_from: up # # Using the role normally (roles: - role: compose_stack) runs both, in order. # playbooks/webapp.yml is the worked example. - name: Sync the payload to the host ansible.builtin.include_tasks: sync.yml - name: Start the stack ansible.builtin.include_tasks: up.yml