I was wondering if there is any documentation available that describes how Ansible works or provides any architecture diagram. I am assuming general steps in Ansible execution are:
Establish SSH connection with a remote host
Copy Ansible modules, roles and playbooks to the remote host
Gather all facts on the remote host
Compile Jinja2 templates on the remote host
Run playbook tasks
Any documentation that describes such execution workflow would be helpful in understanding Ansible.
- read plays/roles
- read inventory
- start tasks execution
- gather facts if set
- execute rest of tasks
- execute handlers if needed
As for task execution (gather facts is just another task):
- compile task, template and assign variables
- copy module + arguments to target
- execute module on target
- process results from module output
There are exceptions to this and many more moving parts, but that is
mostly the gist of it.
the info is gold mine, where would you think it might fit in the docs? (i’d love to see this added and maybe extended. coming from Salt land this info does help big time)