switchs: Improve defaults + Add sw-ec-1
This commit is contained in:
parent
adbd4d5782
commit
2d2177bd25
2 changed files with 51 additions and 79 deletions
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
switch_vars:
|
switch_vars:
|
||||||
name: sw-ec-1
|
name: sw-ec-1
|
||||||
location: Local de Brassage EdC
|
location: "Local_de_Brassage_EdC"
|
||||||
host: 10.130.4.11
|
host: 10.130.4.11
|
||||||
port: 80
|
port: 80
|
||||||
username: "{{ vault_switch.username }}"
|
username: "{{ vault_switch.username }}"
|
||||||
|
@ -9,113 +9,85 @@ switch_vars:
|
||||||
delete_vlans: []
|
delete_vlans: []
|
||||||
vlans:
|
vlans:
|
||||||
- id: 40
|
- id: 40
|
||||||
name: "Filaire_edc"
|
name: "Filaire_EDC"
|
||||||
tagged: "{{ '9-10,14,16,18,22-25' | range2list }}"
|
tagged: "{{ '9-10,12,14,16,18,20,22-25' | range2list }}"
|
||||||
- id: 41
|
- id: 41
|
||||||
name: "Wifi_edc"
|
name: "Wifi_EDC"
|
||||||
tagged: "{{ '5-10,14,16,18,22-25' | range2list }}"
|
tagged: "{{ '5-10,12,14,16,18,20,22-25' | range2list }}"
|
||||||
- id: 42
|
- id: 42
|
||||||
name: "Banni_edc"
|
name: "Banni_EDC"
|
||||||
tagged: "{{ '5-10,14,16,18,22-25' | range2list }}"
|
tagged: "{{ '5-10,12,14,16,18,20,22-25' | range2list }}"
|
||||||
- id: 43
|
- id: 43
|
||||||
name: "Accueil_edc"
|
name: "Accueil_EDC"
|
||||||
tagged: "{{ '5-10,14,16,18,22-25' | range2list }}"
|
tagged: "{{ '5-10,12,14,16,18,20,22-25' | range2list }}"
|
||||||
- id: 110
|
- id: 110
|
||||||
name: "Adherents_ip_publiques"
|
name: "Adherents_IP_Publiques"
|
||||||
tagged: "{{ '9-10,14,16,18,22-25' | range2list }}"
|
tagged: "{{ '9-10,12,14,16,18,20,22-25' | range2list }}"
|
||||||
- id: 111
|
- id: 111
|
||||||
name: "Serveurs_ip_publiques"
|
name: "Serveurs_IP_Publiques"
|
||||||
tagged: "{{ '25' | range2list }}"
|
tagged: "{{ '25' | range2list }}"
|
||||||
- id: 131
|
- id: 131
|
||||||
name: "Onduleurs"
|
name: "Onduleurs"
|
||||||
tagged: [25]
|
tagged: [25]
|
||||||
- id: 144
|
- id: 144
|
||||||
name: "Bornes_wifi_edc"
|
name: "Bornes_Wifi_EDC"
|
||||||
tagged: [25]
|
tagged: [25]
|
||||||
untagged: "{{ '5-10,14,16,18,22-24' | range2list }}"
|
untagged: "{{ '5-8,12,14,16,18,20,22-24' | range2list }}"
|
||||||
ports:
|
ports:
|
||||||
- id: 1
|
- id: 1
|
||||||
name: "Room_edc_Aile_Ouest_363"
|
name: "Room_Ouest_363"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 2
|
- id: 2
|
||||||
name: "Room_edc_Aile_Ouest_364"
|
name: "Room_Ouest_364"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 3
|
- id: 3
|
||||||
name: "Room_edc_Aile_Principale_Foyer_1"
|
name: "Room_Principale_Foyer_1"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 4
|
- id: 4
|
||||||
name: "Room_edc_Aile_Principale_Foyer_2"
|
name: "Room_Principale_Foyer_2"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 5
|
- id: 5
|
||||||
name: "Machine_ep-0-1.borne.auro.re"
|
name: "Borne_Principale_0_1"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 6
|
- id: 6
|
||||||
name: "Machine_ep-1-1.borne.auro.re"
|
name: "Borne_Principale_1_1"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 7
|
- id: 7
|
||||||
name: "Machine_ep-1-2.borne.auro.re"
|
name: "Borne_Principale_1_2"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 8
|
- id: 8
|
||||||
name: "Machine_ep-1-3.borne.auro.re"
|
name: "Borne_Principale_1_3"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 9
|
- id: 9
|
||||||
name: "Room_edc_Aile_Ouest_352"
|
name: "Room_Ouest_352"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 10
|
- id: 10
|
||||||
name: "Room_edc_Aile_Ouest_252"
|
name: "Room_Ouest_252"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 11
|
- id: 11
|
||||||
name: "Room_edc_Aile_Ouest_273"
|
name: "Room_Ouest_273"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
- id: 12
|
||||||
loop_protect: true
|
name: "Borne_Est_2_3"
|
||||||
- id: 13
|
- id: 13
|
||||||
name: "Room_edc_Aile_Ouest_261"
|
name: "Room_Ouest_261"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 14
|
- id: 14
|
||||||
name: "Room_edc_Aile_Ouest_272"
|
name: "Room_Ouest_272"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 15
|
- id: 15
|
||||||
name: "Room_edc_Aile_Ouest_262"
|
name: "Room_Ouest_262"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 16
|
- id: 16
|
||||||
name: "Room_edc_Aile_Est_225"
|
name: "Room_Est_225"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 17
|
- id: 17
|
||||||
name: "Room_edc_Aile_Ouest_263"
|
name: "Room_Ouest_263"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 18
|
- id: 18
|
||||||
name: "Room_edc_Aile_Ouest_76"
|
name: "Room_Ouest_76"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 19
|
- id: 19
|
||||||
name: "Room_edc_Aile_Ouest_264"
|
name: "Room_Ouest_264"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
- id: 20
|
||||||
loop_protect: true
|
name: "Room_Ouest_58"
|
||||||
- id: 21
|
- id: 21
|
||||||
name: "Room_edc_Aile_Ouest_265"
|
name: "Room_Ouest_265"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
- id: 22
|
||||||
loop_protect: true
|
name: "Not_used"
|
||||||
- id: 23
|
- id: 23
|
||||||
name: "Room_edc_Aile_Ouest_158"
|
name: "Room_Ouest_158"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
|
||||||
loop_protect: true
|
|
||||||
- id: 24
|
- id: 24
|
||||||
name: "Room_edc_Aile_Ouest_158"
|
name: "Not_used"
|
||||||
lldp: "LPAS_TX_AND_RX"
|
# id: 25
|
||||||
loop_protect: true
|
# name: "Management_DO_NOT_UNCOMMENT"
|
||||||
|
- id: 26
|
||||||
|
name: "Not_used"
|
||||||
|
- id: 27
|
||||||
|
name: "Not_used"
|
||||||
|
- id: 28
|
||||||
|
name: "Not_used"
|
||||||
...
|
...
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
- path: "{{ item.id }}"
|
- path: "{{ item.id }}"
|
||||||
data:
|
data:
|
||||||
port_id: "{{ item.id | string }}"
|
port_id: "{{ item.id | string }}"
|
||||||
admin_status: "{{ 'LPAS_TX_AND_RX' if item.lldp is defined and item.lldp else 'LPAS_DISABLED' }}"
|
admin_status: "{{ 'LPAS_DISABLED' if item.disable_lldp is defined and item.disable_lldp else 'LPAS_TX_AND_RX' }}"
|
||||||
loop: "{{ switch_vars.ports }}"
|
loop: "{{ switch_vars.ports }}"
|
||||||
|
|
||||||
- name: Configure loop-protect
|
- name: Configure loop-protect
|
||||||
|
@ -43,6 +43,6 @@
|
||||||
path: "loop_protect/ports/{{ item.id }}"
|
path: "loop_protect/ports/{{ item.id }}"
|
||||||
data:
|
data:
|
||||||
port_id: "{{ item.id | string }}"
|
port_id: "{{ item.id | string }}"
|
||||||
is_loop_protection_enabled: "{{ item.loop_protect | default(False) }}"
|
is_loop_protection_enabled: "{{ item.disable_loop_protect | default(True) }}"
|
||||||
loop: "{{ switch_vars.ports }}"
|
loop: "{{ switch_vars.ports }}"
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue