This course is designed to move students beyond Ansible Essentials, and joins Ansible with other DevOps skill sets, including: Python scripting, utilizing Ansible Galaxy, running automated solutions with Jenkins, syncing code with Git and GitHub, continuous integration, debugging / linting, and much more! The lessons are built around current concepts observed within enterprises using Ansible.
- Class is a combination of lecture by demonstration, coding along with the instructor, and hands-on labs. Students are invited to help customize this course by bringing their own projects, solutions, and ideas to ensure class subjects remain as relevant as possible.
Who Can Benefit
- DevOps Engineers
- System and Cloud Administrators
- Network Engineers and Developers
- Python Developers
Prerequisites
- Coding experience in another language serves as an adequate prerequisite
- Ansible Essentials
Follow-on Courses
- Jenkins Automation Server Essentials
- API and API Design with Python
- Git and GitHub
- Git and GitLab
Day 1 (Up and Running with Ansible for DevOps)
Introduction to Environment
- Running with GitHub
- Syncing Git and GitHub
- Cloning repos
- Commits
- Push and Pull operations
- Master and Branches
- Documenting work
- Moving HEAD
- GitHub Desktop for GUIs
Ansible and Jenkins
- Syncing GitHub Playbooks to Jenkins
- Running Playbooks with Jenkins
- Building Jenkins Jobs
- Jenkins and Plugins to know
Roles and Galaxy
- Building an Ansible Role
- Role Testing with Molecule
- Using a Role within a Playbook (review)
- Pushing Role to GitHub
Day 2 (Advanced Ansible)
Advanced Ansible
- Blocks & Rollback
- Asynchronous Actions and Polling
- Check Mode (“Dry Run”)
- Playbook Debugger
- Delegation, Rolling Updates, and Local Actions
- Setting the Environment (and Working With Proxies)
- Working With Language-Specific Version Managers
- Error Handling In Playbooks
- Advanced Syntax
- Working With Plugins
- Prompts
- Tags
- Using Vault in playbooks
- Start and Step
- Playbook Keywords
- Lookups
- Module defaults
Day 3 (Programming Ansible with Python)
Critical Python Catchup & Review (moving target -- depends on students previous knowledge)
- Overview of Python and Ansible
- Conditional expressions
- Relational and Boolean operators
- Lists, Tuples, Dictionaries
- Indexing and slicing
- Built-in functions
- Writing custom functions
- Getting at methods
- Iterating with Loops (for and while)
- Working with files
- Getting at RESTful interfaces with Python
- Working with JSON
- Python, Ansible and Paramiko
- Using Paramiko to SSH with keys and passwords
- Python and Jinja templating
Python in Playbooks
- Using methods within playbooks
- Python methods vs Jinja2 filters
- Calling Scripts with Ansible
- Writing Python Scripts for Customer Environment
- Returning JSON when our script finishes
- Ansible callback plugins - returning data other than JSON
Day 4 (Advanced Playbook Design)
Extending the Ansible Library
- Extending Ansible to support
- Galaxy for new Ansible modules
- GitHub for new Ansible modules
Creating Ansible Modules
- Writing a Python Script
- Adopting a Python Script to function as a Ansible Module
- Pushing our new module to GitHub
- Documenting our new module
- Classes of Ansible Modules available
Ansible and for Enterprise
- Hiding credentials
- Using Ansible Vault
- Collaborating on Playbooks
- Options for logging results
- Options for running Ansible Jobs in an Enterprise
- Jenkins
- Ansible Tower
- Logging Results
- Rolling Back bad jobs & other jobs