feat: add initial work to configure cisco router

This commit is contained in:
David Kilias 2023-07-13 23:44:00 +02:00
parent 925a4ab1b0
commit a9567bd31d
3 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,31 @@
---
ansible_host: 172.23.63.31
ansible_user: admin
ansible_password: {{ vault_ansible_password }}
ansible_connection: network_cli
ansible_network_os: ios
vlans:
- id: 2
name: voip
- id: 3
name: av
- id: 4
name: lan
- id: 5
name: wan
- id: 6
name: tor
- id: 7
name: service
- id: 8
name: legacy
- id: 9
name: dmz
- id: 10
name: ffmd-wan
- id: 11
name: ffmd-client
- id: 12
name: ffmd-mesh
- id: 4000
name: internet

View file

@ -17,6 +17,7 @@ all:
k3s-w1.n39.eu:
k3s-w2.n39.eu:
k3s-w3.n39.eu:
cisco-catalyst-2960s.n39.eu:
children:
docker_host:
@ -69,3 +70,6 @@ all:
k3s-w1.n39.eu:
k3s-w2.n39.eu:
k3s-w3.n39.eu:
network:
hosts:
cisco-catalyst-2960s.n39.eu:

26
switch-cisco-2960s.yml Normal file
View file

@ -0,0 +1,26 @@
---
- hosts: cisco-catalyst-2960s.n39.eu
tasks:
- name: configure login banner
cisco.ios.ios_banner:
banner: login
text: welcome to cisco-catalyst-2960s
state: present
- name: set hostname
cisco.ios.ios_hostname:
config:
hostname: cisco-catalyst-2960s
state: override
- name: configure vlans
cisco.ios.ios_vlans:
config:
- name: {{ item.name }}
vlan_id: {{ item.id }}
state: active
shutdown: disabled
remote_span: true
state: merged
loop: "{{ vlans | dict2items }}"