Debugging executor code
Executor code in Ansible is the connector code that binds together inventory data, playbooks, plays, tasks, and connection methods. While each of those other code bits can be individually debugged, how they interact can be examined within executor code.
The executor classes are defined in various files within executor/ and the PlaybookExecutor class. This class handles executing all of the plays and tasks within a given playbook. The class creation function, __init__(), creates a series of placeholder attributes, as well as setting some default values, while the run() function is where most of the fun happens.
Debugging can often take you from one file to another, jumping around the code base. For example, in the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access