Ansible site for MOC/OCT switches
- Dell OS9 (FTOS9)
- Cisco NXOS
- Cumulus Linux 5 (WIP)
- PicOS 8 (WIP)
-
Install newest version of ansible
-
Install required PyPI packages:
pip install --user ansible-pylibssh
-
Install the required ansible modules:
ansible-galaxy collection install -r requirements.yaml -
Set up AWS CLI and be sure you can access the correct secrets
-
On your client, you may have to enable legacy kex algorithms for some switches:
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
| Parameter | Dell OS9 | Cisco NXOS | Cumulus Linux 5 | PicOS 8 |
|---|---|---|---|---|
| description | ✅ | ✅ | ❌ | ❌ |
| state | ✅ | ✅ | ❌ | ❌ |
| mtu | ✅ | ✅ | ❌ | ❌ |
| fec | ✅ | ✅ | ❌ | ❌ |
| autoneg | ✅ | ✅ | ❌ | ❌ |
| stp/edgeport | ✅ | ✅ | ❌ | ❌ |
| stp/bpduguard | ✅ | ✅ | ❌ | ❌ |
| stp/rootguard | ✅ | ✅ | ❌ | ❌ |
| stp/disabled | ✅ | ✅ | ❌ | ❌ |
| fanout | ✅ | ✅ | ❌ | ❌ |
| managed | ❌ | ✅ | ❌ | ❌ |
| allowlist | ✅ | ❌ | ❌ | ❌ |
| blocklist | ✅ | ❌ | ❌ | ❌ |
| portmode | ✅ | ✅ | ❌ | ❌ |
| untagged | ✅ | ✅ | ❌ | ❌ |
| tagged | ✅ | ✅ | ❌ | ❌ |
| ip4 | ✅ | ✅ | ❌ | ❌ |
| ip6 | ✅ | ✅ | ❌ | ❌ |
| lag-members | ✅ | ✅ | ❌ | ❌ |
| lacp-members-active | ✅ | ✅ | ❌ | ❌ |
| lacp-members-passive | ✅ | ✅ | ❌ | ❌ |
| lacp-rate | ✅ | ✅ | ❌ | ❌ |
| mlag | ✅ | ✅ | ❌ | ❌ |
idVLAN 802.1q tag (Integer)nameIdentifying name for the vlan (String)descriptionDescription for the vlan (String)managedDon't create nor destroy this VLAN (Boolean)fabricsDefine fabrics on which vlans can exist (ansible host groups) (List of strings)
descriptionSets the description of the interface. (String)stateSets the admin state of the mode ("up", or "down")mtuSets the MTU of the interface (Integer 576-9416)fecIf false, forward-error-correction is disabled on the interface (Boolean)autonegIf false, auto-negotiation is disabled on the interface (Boolean)stpSets STP ParametersedgeportSets whether port should be an edge port (Boolean)bpduguardEnables BPDUguard on an interface (Boolean)rootguardEnables Rootguard on an interface (Boolean)disabledDisables STP on the interface (Boolean)
fanoutSets fanout configurationmodeSets mode (single,dual, orquad)speedSets the fanout speed (10G,25G, or40G)
managedIf true, this interface will not be configured by ansible. Works for both VLANs and interfaces (Boolean)allowlistOnly allow modification of these fields (List of Strings)blocklistBlock modification of these fields (List of Strings)portmodeL2 portmode of an interface (String "access", "trunk", or "hybrid")untaggedSingle vlan to untag, requires portmode access or hybrid (Integer 2-4094)taggedList of vlans to tag, requires portmode trunk or hybrid (List of Integers 2-4094)ip4Sets the IPv4 address of the interface (String "X.X.X.X/YY")ip6Sets the IPv6 address of the interface (String)lag-membersList of non-LACP lag members for a port channel (List of Strings, interface names)lacp-members-activeList of LACP active members for a port channel (List of Strings, interface names)lacp-members-passiveList of LACP passive members for a port channel (List of Strings, interface names)lacp-rateSets the switch rate for LACP only (String "fast" or "slow")mlagSet the label of the peer port-channel for a paired switch (String interface name)
Every switch that exists in the MOCA system exists in this ansible site's host file. This project does not support all NOS types yet so some don't have individual host vars but exist in the hosts file for documentation sake.
Network equipment addresses follow a common convention. Each list item represents one octet of an IPv4 address:
10.[80,81]80 for MOC/NERC, 81 for OCT[1,2]1 for core networking, 2 for rack networking10*<rack number> + unit numberEach rack gets its own unique number. For example, 3 switches in a rack might be21,22, and23