netz39-infra-ansible/device-cisco-2960-1.yml

98 lines
2.5 KiB
YAML
Raw Normal View History

2023-07-14 21:47:25 +02:00
---
- hosts: cisco-2960-1.n39.eu
become: true
tasks:
- name: configure login banner
cisco.ios.ios_banner:
banner: login
text: "Documentation here: https://wiki.netz39.de/internal:inventory:network:2960s-24td-l"
state: present
2023-07-14 22:05:57 +02:00
- name: configure vlans
cisco.ios.ios_vlans:
config:
- name: lan
vlan_id: 4
state: active
shutdown: disabled
- name: wan
vlan_id: 5
state: active
shutdown: disabled
- name: service
vlan_id: 7
state: active
shutdown: disabled
- name: legacy
vlan_id: 8
state: active
shutdown: disabled
- name: dmz
vlan_id: 9
state: active
shutdown: disabled
- name: ffmd-client
vlan_id: 11
state: active
shutdown: disabled
state: merged
2023-07-14 22:44:02 +02:00
- name: configure port assignment
cisco.ios.ios_l2_interfaces:
config:
# USV
- name: Gi1/0/6
mode: access
access:
vlan: 1
# beaker ipmi
- name: Gi1/0/9
mode: access
access:
vlan: 1
# Patchfeld 1, Switch ausleihliste
- name: Gi1/0/13
mode: trunk
trunk:
allowed_vlans: 1,4,5,7,8,11
native_vlan: 4
# encapsulation: dot1q
# patchfeld 2 - Raspberry Pi Platon
- name: Gi1/0/15
mode: access
access:
vlan: 4
# patchfeld 6 - Access Point Hempels Zimmer
- name: Gi1/0/17
mode: access
access:
vlan: 4
# FräsPC
- name: Gi1/0/19
mode: access
access:
vlan: 4
# patchfeld 4 - Switch am Basteltisch
- name: Gi1/0/20
mode: trunk
trunk:
allowed_vlans: 1,4,5,7,8,11
native_vlan: 4
# encapsulation: dot1q
# uplink descartes
- name: Gi1/0/25
mode: trunk
trunk:
allowed_vlans: 1-11
native_vlan: 1
# encapsulation: dot1q
# server marx
- name: Gi1/0/26
mode: trunk
trunk:
allowed_vlans: 1-11
native_vlan: 1
# encapsulation: dot1q
state: merged