In this chapter, we will explore some advanced features and techniques that we can use in Ansible, along with some best practices, in order to build clearer and more robust Ansible playbooks for network automation. All of these techniques can be used with all the code from the previous chapters.
The recipes covered in this chapter are as follows:
- Installing Ansible in a virtual environment
- Validating YAML and Ansible playbooks
- Calculating the execution time for Ansible playbooks
- Validating user input using Ansible
- Running Ansible in check mode
- Controlling parallelism and rolling updates in Ansible
- Configuring fact caching in Ansible
- Creating custom Python filters for Ansible