Ansible execution workflow

82 views
Skip to first unread message

knowshan

unread,
Aug 9, 2016, 7:31:39 PM8/9/16
to Ansible Project

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.

--
Thanks,
Shantanu

Brian Coca

unread,
Feb 9, 2017, 10:13:13 PM2/9/17
to Ansible Project
Nothing up 2 date, but here is a quick rundown:

- 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.

----------
Brian Coca

DanyC

unread,
Feb 11, 2017, 2:33:53 AM2/11/17
to Ansible Project
Brian,

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)

cheers
Reply all
Reply to author
Forward
0 new messages