This Intermediate Ansible training course dives into further automating provisioning, configure management, and deployment using Ansible. Attendees master advanced topics in Ansible playbook construction, module utilization, role configuration, and node management.
Skills Gained
- Perform advanced configuration for an Ansible control node and managed nodes
- Use conditionals, loops, filters, and loopbacks in playbooks
- Control ad-hoc and playbook output with callback plugins
- Create and implement dynamic inventory definitions
- Implement reusable roles capabilities and dependencies
- Control Ansible Core operations with run-time parameters
- Create templates to write an Ansible custom module
- Add documentation to an Ansible customized module
- Create and use local fact variables
- Implement local fact variables on managed nodes
- Write playbooks to collect data from managed nodes
Prerequisites
It is assumed that participants are working systems administrators, developers, and/or testers with some very basic scripting knowledge (bash, ksh, Perl or Python) and an understanding of fundamental system utilities/commands on Linux and Windows systems. It is also assumed that participants have attended the Introduction to Ansible Configuration and Administration course, or have a working knowledge of the Ansible Core and the Ansible Tower.
Training Materials
All Ansible training attendees receive comprehensive courseware.
Software Requirements
Attendees will not need to install any software on their computers for this class. The class will be conducted in a remote environment that Accelebrate will provide; students will only need a local computer with a web browser and a stable Internet connection. Any recent version of Microsoft Edge, Safari, or Google Chrome will work well.
Outline
- Review of Control Code and Managed Node Required Configuration
- Ansible components review
- Running Ansible in escalated privilege mode
- SSH key setup
- Ansible common account creation, setup, and features
- Required components for a Linux/Unix/Windows managed node
- Advanced Control Node Setup and Configuration
- Ansible Core installation methods: rpm, pip, and Tower (changes)
- Ansible command and module documentation
- Inventory hosts file contents (Linux/Unix, Windows, and network device nodes)
- Dynamic inventory hosts file contents and usage
- Ansible configuration file (locations and parameter definitions)
- Special use configuration parameter definitions
- Methods to control gathering of system facts
- Creating and using local system facts
- Understanding the hostvars dictionary usage
- Variable creation and usage
- Ansible Playbooks
- Layout of a playbook: directives, tasks and arguments, module modifiers
- Installing and using ansible-lint
- Playbook: loops, conditionals, tags, notifications, plugins, filters, and lookups
- Controls: output formatting and inclusion with callbacks
- Advanced Jinja 2 template usage
- Using “inner” and “outer” playbooks
- Ansible Modules/Tasks
- Including external tasks in a playbook
- Controls over node and task scheduling
- Configuration parameters that control rolling updates
- Using Ansible playbook debugging capabilities
- Writing a customized module and embedded documentation
- Roles in Ansible
- Review of role creation/structure, packaging, and usage
- Importing role definitions (on a control node)
- Role dependencies definitions and usage
- Collections in Ansible
- Collection creation and structure (components)
- Using a role inside of a collection
- Using a module inside of a collection
- Using a playbook inside of a collection
- Conclusion