Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Ansible

You're reading from   Mastering Ansible Design, develop, and solve real world automation and orchestration needs by unlocking the automation capabilities of Ansible

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher Packt
ISBN-13 9781784395483
Length 236 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Debugging code execution


Sometimes logging and inspection of variable data is not enough to troubleshoot a problem. When this happens, it can be necessary to dig deeper into the internals of Ansible. There are two main sets of Ansible code: the code that runs locally on the Ansible host, and the module code that runs remotely on the target host.

Debugging local code

The local Ansible code is the lion's share of the code that comes with Ansible. All the playbook, play, role, and task parsing code live locally. All the task result processing code and transport code live locally. All the code except for the assembled module code that is transported to the remote host lives locally.

Local Ansible code can be broken down into three major sections: inventory, playbook, and runner. Inventory code deals with parsing inventory data from host files, dynamic inventory scripts, or combinations of the two in directory trees. Playbook code is used to parse the playbook YAML code into Python objects within...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime