Learning paths › Automation › The Ansible lab and the controller
The Ansible lab and the controller
Standing up the control node a longer Ansible series runs from — what the lab must provide, a hosted vendor sandbox instead of local devices, why the controller is Linux rather than Windows, SSH negotiated with an older device, playbooks edited over a remote connection and versioned to a repository — then Ansible itself installed in a virtual environment, the right command picked for the job, defaults set in a project ansible.cfg, hosts and groups named in an inventory, YAML's mappings, sequences and scalars read, a playbook structured into plays and tasks and checked with ansible-lint, and Vault encrypting one secret or a whole variables file. Explanation and checks; four written exercises.
Lessons
- Express a network operation as a repeatable playbook
- See the path from lab to custom modules
- Know what the lab must provide before you start
- Use a hosted sandbox instead of local devices
- Enable hardware virtualization for nested lab nodes
- Run the controller on Linux, not Windows
- Point the controller at a remote DevNet device
- Negotiate SSH with an older device
- Edit playbooks on the controller over Remote-SSH
- Use WSL as an alternative controller
- Version your playbooks with Git and GitHub
- Save reusable SSH sessions for manual checks
- Ansible: drive devices from a control node
- Install Ansible in a Python virtual environment
- Pick the right ansible command for the job
- Set defaults with a project-level ansible.cfg
- Name hosts and groups in an inventory
- Name variables so Ansible accepts them
- Read YAML mappings, sequences and scalars
- Structure a playbook into plays and tasks
- Catch playbook mistakes with ansible-lint
- Log in to a device with an SSH key
- Encrypt one secret inside readable YAML
- Encrypt a whole variables file
More in Automation
- First scripts that configure devices
- NAPALM: structured data across vendors
- Concurrency, and the Python types device output returns
- Parsing show output and testing conditions
- Readable code, branching and loops
- Build the workstation and the toolchain
- Files, CSV, JSON and pickle
- Paramiko: SSH to devices from Python
- Netmiko at fleet scale
- Tuples, sets and dictionaries for device records
- Exceptions and your first classes
- Plan and build the automation lab
- Files, formatting and regular expressions
- Addresses, functions, modules and classes
- CSV inventories, logging and scheduling
- Netmiko, SCP and structured parsing
- Agents, async and model-driven workflows
- NETCONF, YANG and RESTCONF
- NX-API, pyATS and Genie
- A small GenAI app, end to end
- macOS, Linux and the virtual lab
- Agile delivery and Python fundamentals
- REST APIs, authentication and requests
- Flask, Docker and Jenkins
- Managing a router with NETCONF and RESTCONF
- Ansible: inventory, ad-hoc commands and first playbooks
- Roles and zero-touch provisioning for Linux switches
- Installing the controller and applying a project
- Setting up Python 3
- Vault, variables and config changes
- Parsing output and knowing which variable wins
- Jinja filters and PAN-OS automation
- Loops, callbacks, strategy and run control
- Roles, imports and writing your own module
- Running playbooks from AWX