Ansible Automation Lab (sydasif)
A beginner-friendly Ansible-for-network-engineers lab: start with Linux server playbooks, then move to Cisco IOS network playbooks (VLANs, OSPF, EIGRP, backups) on GNS3/EVE-NG.
Setup, key playbooks & run commands
Clone the lab and install Ansible plus the Cisco IOS collection. The lab is split into ansible-server-lab (Linux) and ansible-network-lab (Cisco IOS on GNS3/EVE-NG).
git clone https://github.com/sydasif/ansible-automation-lab.git
cd ansible-automation-lab
pip install -r requirements.txt
ansible-galaxy collection install cisco.iosThe classic starting point: confirm Ansible can reach managed Linux hosts before doing real work.
cd ansible-server-lab
ansible-playbook -i inventory playbooks/ping.ymlInstall packages across mixed distros (Ubuntu and Fedora) using variables and 'when' conditionals โ the core of idempotent OS automation.
ansible-playbook -i inventory playbooks/playbook-8.yml
# Related lessons:
# playbook-3.yml -> variables
# playbook-6/7.yml -> per-distro conditionals
# playbook-10.yml -> updates + web serverConnect to Cisco IOS devices and save 'show running-config' to a file per host โ config backup the Ansible way.
cd ../ansible-network-lab
ansible-playbook -i inventory playbooks/save_sh_run.yml
ansible-playbook -i inventory playbooks/02_copy_run_sta.ymlProvision VLANs from a list using loops (standard and dictionary loops) so one task scales to many VLANs.
ansible-playbook -i inventory playbooks/create_vlan.yml
ansible-playbook -i inventory playbooks/vlan_loop.yml
ansible-playbook -i inventory playbooks/dict_loop.ymlPush routing configuration (OSPF on the core, EIGRP on distribution) to a multi-layer campus topology.
ansible-playbook -i inventory playbooks/ospf_core.yml
ansible-playbook -i inventory playbooks/ospf_r1.yml
ansible-playbook -i inventory playbooks/eigrp_dist.ymlEnd-to-end campus playbooks that build out Campus 1โ4 topologies running in GNS3 / EVE-NG.
ansible-playbook -i inventory gns3-playbook/GNS3-Campus1.ymlThe repo ships dozens of small, focused playbooks plus sample IOS configs. Follow the online lab guide for the full step-by-step walkthrough and a recommended learning order.