In this chapter, we have seen how to debug Ansible playbooks using syntax checking, the checking mode with and without --diff, and functional testing.
As part of functional testing, we have seen how to perform assertions on the end state of the system, how to leverage tags for testing as well as how to use the --syntax-check option and the ANSIBLE_KEEP_REMOTE_FILES and ANSIBLE_DEBUG flags. Then, we moved to the management of failures, and, lastly, we saw how to trigger failures intentionally.
In the next chapter, we will discuss multi-tier environments as well as deployment methodologies.