Written by Mitch in Automation on Sat 07 February 2015. Tags: ansible, automation, cumuluslinux,
I don't get around to writing these nearly enough. At work I got my hands on a pair of switchs from Penguin Computing. They're whitebox switches running Cumulus Linux. Which is, as they describe it, not based on Linux, it IS Linux. Making me fully right at home. Cumulus Networks has done really well being part of the automation scene since they're inception. They have written modules for Ansible and Puppet to make configuring their switches easier. Which I will be utilizing in this post.
- Setup base configuration on switch
- Setup persitance across OS upgrades
- Upgrade Switch to CumulusLinux 2.5.0
This will required that your ansible.cfg file has included the Library directory of the CumulusLinux Modules.
Base Ansible Directory
. ├── ansible.cfg ├── configure.yml ├── group_vars │ ├── all │ └── rack-3 ├── hosts ├── LICENSE ├── README.md ├── roles │ ├── common │ │ ├── files │ │ │ └── backups │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates method of implementing vlans │ │ ├── hostname.j2 │ │ ├── hosts.j2 │ │ └── motd.j2 │ ├── interfaces │ │ └── tasks │ │ └── main.yml │ └── upgrade_sw │ └── tasks │ └── main.yml └── upgrade-switch.yml
Quick run through of the important bits. I haven't done any massive deployments but my plans for deployment are based on Racks, and I haven't quite figured out a good DRY method for handling VLANs in these files so, if you know of a better way would love to hear it.
I have an ansible.cfg file in this directory so I can add an include for having the CumulusLinux modules in the same directory. I also have kept my ...