new playbook: playbook_create_switch_configs_stock for ans
creates local configs files for the stock firmware on the zyxel switches assumes that all switches have the same config (except admin pw and ip)add_site_ans
parent
61c1255e64
commit
2cc3c9457a
|
@ -1,2 +1,3 @@
|
|||
ansible-facts.json/
|
||||
switch-configs-stock/
|
||||
*.html
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- name: generate configuration for stock firmware
|
||||
hosts:
|
||||
- switches_stock
|
||||
gather_facts: no
|
||||
connection: local
|
||||
tasks:
|
||||
- name: create output directory
|
||||
file:
|
||||
state: directory
|
||||
path: switch-configs-stock/
|
||||
|
||||
- name: generate configuration
|
||||
template:
|
||||
src: templates/gs1900-10hp-stock.cfg.j2
|
||||
dest: "switch-configs-stock/{{ inventory_hostname }}.cfg"
|
|
@ -0,0 +1,126 @@
|
|||
! System Description: ZyXEL GS1900-10HP Switch
|
||||
! Revision:
|
||||
! Serial Number:
|
||||
! MAC Address Range:
|
||||
! Boot Version:
|
||||
! Firmware Version:
|
||||
! System Up Time:
|
||||
!
|
||||
!
|
||||
!
|
||||
system name "{{ inventory_hostname }}"
|
||||
ip address {{ ip }} mask 255.255.255.0
|
||||
ip default-gateway 10.85.1.1
|
||||
ip dns 10.85.1.1 0.0.0.0
|
||||
username "admin" password {{ lookup('passwordstore', 'switches/{{ inventory_hostname }}') }}
|
||||
vlan 1
|
||||
name "mgmt"
|
||||
vlan 2
|
||||
name "clients"
|
||||
vlan 3
|
||||
name "wan"
|
||||
vlan 8
|
||||
name "backoffice"
|
||||
voice-vlan oui-table 00:E0:BB "3COM"
|
||||
voice-vlan oui-table 00:03:6B "Cisco"
|
||||
voice-vlan oui-table 00:E0:75 "Veritel"
|
||||
voice-vlan oui-table 00:D0:1E "Pingtel"
|
||||
voice-vlan oui-table 00:01:E3 "Siemens"
|
||||
voice-vlan oui-table 00:60:B9 "NEC/Philips"
|
||||
voice-vlan oui-table 00:0F:E2 "H3C"
|
||||
voice-vlan oui-table 00:09:6E "Avaya"
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
spanning-tree mst configuration
|
||||
name "{{ base_mac }}"
|
||||
!
|
||||
!
|
||||
!
|
||||
no snmp community "public"
|
||||
snmp community "{{ lookup('passwordstore', 'snmp-community') }}" ro
|
||||
!
|
||||
!
|
||||
ip ssh
|
||||
!
|
||||
!
|
||||
management access-list default
|
||||
!
|
||||
interface lag1
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface lag2
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface lag3
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface lag4
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface lag5
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface lag6
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface lag7
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface lag8
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 1
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 2
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 3
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 4
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 5
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 6
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 7
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 8
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 9
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
interface 10
|
||||
switchport hybrid ingress-filtering
|
||||
switchport hybrid allowed vlan add 2-3,8 tagged
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
|
Loading…
Reference in New Issue