Rozdělení do skupin DSA a swconfig, úprava role network
This commit is contained in:
@@ -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"
|
||||
|
||||
1
group_vars/dsa.yml
Normal file
1
group_vars/dsa.yml
Normal file
@@ -0,0 +1 @@
|
||||
device_bridge_port: "{{ network_devices_append[0].name }}"
|
||||
1
group_vars/swconfig.yml
Normal file
1
group_vars/swconfig.yml
Normal file
@@ -0,0 +1 @@
|
||||
device_bridge_port: "{{ ansible_facts.openwrt_interfaces.mgmnt.device | regex_search('eth[0-9]+') }}"
|
||||
Reference in New Issue
Block a user