Rozdělení do skupin DSA a swconfig, úprava role network

This commit is contained in:
2024-11-01 03:32:26 +01:00
parent 587ca23374
commit cde297bd2e
18 changed files with 201 additions and 268 deletions

View File

@@ -1,36 +1,35 @@
device_bridge_port: "{{ ansible_facts.openwrt_interfaces.mgmnt.device | regex_search('eth[0-9]+|wan') }}"
device_2g_radio: "{{ (ansible_facts.openwrt_wireless | dict2items | selectattr('value.config.band', 'equalto', '2g') | map(attribute='key') | first) | default('none') }}"
device_5g_radio: "{{ (ansible_facts.openwrt_wireless | dict2items | selectattr('value.config.band', 'equalto', '5g') | map(attribute='key') | first) | default('none') }}"
network_devices:
- id: "@device[1]"
name: "br-vlan129"
- name: "br-vlan129"
state: "present"
type: "bridge"
ports: ["{{ device_bridge_port }}.129"]
- id: "@device[2]"
name: "br-vlan137"
- name: "br-vlan137"
state: "present"
type: "bridge"
ports: ["{{ device_bridge_port }}.137"]
- id: "@device[3]"
name: "br-vlan145"
- name: "br-vlan145"
state: "present"
type: "bridge"
ports: ["{{ device_bridge_port }}.145"]
- id: "@device[4]"
name: "br-free"
- name: "br-free"
state: "present"
type: "bridge"
ports: ["{{ device_bridge_port }}.152"]
- id: "@device[5]"
name: "br-oldaurora"
- name: "br-oldaurora"
state: "present"
type: "bridge"
ports: ["{{ device_bridge_port }}.128"]
network_interfaces:
- id: "mgmnt"
proto: "static"
device: "{{ device_bridge_port }}.99"
ipaddr: "{{ device_ip_address }}/24"
gateway: "{{ device_ip_address | regex_replace('\\.[0-9]+$', '.1') }}"
dns: ["{{ device_ip_address | regex_replace('\\.[0-9]+$', '.1') }}"]
- id: "hoste_wifi"
proto: "none"
device: "br-vlan129"