From cde297bd2e7b69169c0d64805332ecec7fe40e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Z=C3=A1le=C5=A1=C3=A1k?= Date: Fri, 1 Nov 2024 03:32:26 +0100 Subject: [PATCH] =?UTF-8?q?Rozd=C4=9Blen=C3=AD=20do=20skupin=20DSA=20a=20s?= =?UTF-8?q?wconfig,=20=C3=BAprava=20role=20network?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group_vars/accessPoints.yml | 23 +++--- group_vars/dsa.yml | 1 + group_vars/swconfig.yml | 1 + host_vars/ap_0c806307e88a.yml | 18 ----- host_vars/ap_107c61992bd8.yml | 78 ++++++++----------- host_vars/ap_b04e26bbc7e3.yml | 27 ++----- host_vars/ap_c47154391634.yml | 25 +++--- host_vars/ap_c47154393f26.yml | 28 +++---- ...7f54de81d8.yml => not_ap_c87f54de81d8.yml} | 0 inventory.yml | 26 ++++--- roles/network/handlers/main.yml | 7 +- roles/network/tasks/device.yml | 45 +++++------ roles/network/tasks/main.yml | 38 +++++---- roles/network/tasks/swconfig.yml | 31 ++++++++ roles/network/tasks/switch_dsa.yml | 40 ---------- roles/network/tasks/switch_swconfig.yml | 40 ---------- roles/network/tasks/vlan_filtering.yml | 29 +++++++ setupAllAPs.yml | 12 ++- 18 files changed, 201 insertions(+), 268 deletions(-) create mode 100644 group_vars/dsa.yml create mode 100644 group_vars/swconfig.yml rename host_vars/{ap_c87f54de81d8.yml => not_ap_c87f54de81d8.yml} (100%) create mode 100644 roles/network/tasks/swconfig.yml delete mode 100644 roles/network/tasks/switch_dsa.yml delete mode 100644 roles/network/tasks/switch_swconfig.yml create mode 100644 roles/network/tasks/vlan_filtering.yml diff --git a/group_vars/accessPoints.yml b/group_vars/accessPoints.yml index 344a539..72826f8 100644 --- a/group_vars/accessPoints.yml +++ b/group_vars/accessPoints.yml @@ -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" diff --git a/group_vars/dsa.yml b/group_vars/dsa.yml new file mode 100644 index 0000000..585dae1 --- /dev/null +++ b/group_vars/dsa.yml @@ -0,0 +1 @@ +device_bridge_port: "{{ network_devices_append[0].name }}" \ No newline at end of file diff --git a/group_vars/swconfig.yml b/group_vars/swconfig.yml new file mode 100644 index 0000000..98a1b72 --- /dev/null +++ b/group_vars/swconfig.yml @@ -0,0 +1 @@ +device_bridge_port: "{{ ansible_facts.openwrt_interfaces.mgmnt.device | regex_search('eth[0-9]+') }}" \ No newline at end of file diff --git a/host_vars/ap_0c806307e88a.yml b/host_vars/ap_0c806307e88a.yml index 8e5f29a..32607e3 100644 --- a/host_vars/ap_0c806307e88a.yml +++ b/host_vars/ap_0c806307e88a.yml @@ -1,24 +1,6 @@ device_ip_address: "10.11.99.4" device_hostname: "ap-outdoor" -# network_switch_vlans: -# - id: "@switch_vlan[1]" -# vlan: "128" -# ports: "0t 1t 2 3t 4 5" -# description: "hoste" -# - id: "@switch_vlan[2]" -# vlan: "136" -# ports: "0t 1t" -# description: "studenti" -# - id: "@switch_vlan[3]" -# vlan: "144" -# ports: "0t 1t 3t" -# description: "ucitele" -# - id: "@switch_vlan[4]" -# vlan: "152" -# ports: "0t 1t" -# description: "free" - # wireless_devices: # - id: "" # channel: "6" diff --git a/host_vars/ap_107c61992bd8.yml b/host_vars/ap_107c61992bd8.yml index 3b6bd05..a09eccf 100644 --- a/host_vars/ap_107c61992bd8.yml +++ b/host_vars/ap_107c61992bd8.yml @@ -1,52 +1,36 @@ device_ip_address: "10.11.99.2" -device_hostname: "" +device_hostname: "ap-pokoj" -network_dsa_switch_vlans: - - id: "@switch_vlan[1]" - vlan: "128" - ports: "0t 6t 1 2 3 4" - description: "hoste" - - id: "@switch_vlan[2]" - vlan: "129" - ports: "0t 6t" - description: "hoste_wifi" - - id: "@switch_vlan[3]" - vlan: "136" - ports: "0t 6t" - description: "studenti_lan" - - id: "@switch_vlan[4]" - vlan: "137" - ports: "0t 6t" - description: "studenti_wifi" - - id: "@switch_vlan[5]" - vlan: "144" - ports: "0t 6t" - description: "ucitele_lan" - - id: "@switch_vlan[6]" - vlan: "145" - ports: "0t 6t" - description: "ucitele_wifi" - - id: "@switch_vlan[7]" - vlan: "152" - ports: "0t 6t" - description: "free_wifi" -# network_switch_vlans: -# - id: "@switch_vlan[1]" -# vlan: "128" -# ports: "0t 1t 2 3t 4 5" -# description: "hoste" -# - id: "@switch_vlan[2]" -# vlan: "136" -# ports: "0t 1t" -# description: "studenti" -# - id: "@switch_vlan[3]" -# vlan: "144" -# ports: "0t 1t 3t" -# description: "ucitele" -# - id: "@switch_vlan[4]" -# vlan: "152" -# ports: "0t 1t" -# description: "free" +network_devices_append: + - name: "br0" + state: "present" + type: "bridge" + ports: ["wan", "lan1", "lan2", "lan3"] +network_bridge_vlan_filtering: + - vlan: "99" + device: "{{ device_bridge_port }}" + ports: ["wan:t"] + - vlan: "128" + device: "{{ device_bridge_port }}" + ports: ["wan:t", "lan1", "lan2:t"] + - vlan: "129" + device: "{{ device_bridge_port }}" + ports: ["wan:t", "lan2:t"] + - vlan: "136" + device: "{{ device_bridge_port }}" + ports: ["wan:t", "lan2:t"] + - vlan: "137" + device: "{{ device_bridge_port }}" + ports: ["wan:t", "lan2:t"] + - vlan: "144" + device: "{{ device_bridge_port }}" + ports: ["wan:t", "lan2:t"] + - vlan: "145" + device: "{{ device_bridge_port }}" + ports: ["wan:t", "lan2:t"] + - vlan: "152" + device: "{{ device_bridge_port }}" + ports: ["wan:t", "lan2:t"] # wireless_devices: # - id: "" diff --git a/host_vars/ap_b04e26bbc7e3.yml b/host_vars/ap_b04e26bbc7e3.yml index 91a46f3..b21f48f 100644 --- a/host_vars/ap_b04e26bbc7e3.yml +++ b/host_vars/ap_b04e26bbc7e3.yml @@ -1,39 +1,28 @@ device_ip_address: "10.11.99.3" device_hostname: "ap-predsin" -network_swconfig_switch_vlans: - - id: "@switch_vlan[1]" - vlan: "128" +network_swconfig: + - vlan: "128" ports: "0t 1t 2" description: "hoste_lan" - - id: "@switch_vlan[2]" - vlan: "129" + - vlan: "129" ports: "0t 1t" description: "hoste_wifi" - - id: "@switch_vlan[3]" - vlan: "136" + - vlan: "136" ports: "0t 1t" description: "studenti_lan" - - id: "@switch_vlan[4]" - vlan: "137" + - vlan: "137" ports: "0t 1t" description: "studenti_wifi" - - id: "@switch_vlan[5]" - vlan: "144" + - vlan: "144" ports: "0t 1t" description: "ucitele_lan" - - id: "@switch_vlan[6]" - vlan: "145" + - vlan: "145" ports: "0t 1t" description: "ucitele_wifi" - - id: "@switch_vlan[7]" - vlan: "152" + - vlan: "152" ports: "0t 1t" description: "free_wifi" - - id: "@switch_vlan[8]" - vlan: "199" - ports: "0t 1t" - description: "oldAurora" wireless_devices: - id: "{{ device_2g_radio }}" diff --git a/host_vars/ap_c47154391634.yml b/host_vars/ap_c47154391634.yml index a92084c..fdcc454 100644 --- a/host_vars/ap_c47154391634.yml +++ b/host_vars/ap_c47154391634.yml @@ -1,40 +1,33 @@ device_ip_address: "10.11.99.6" device_hostname: "ap-vila-dole" -network_swconfig_switch_vlans: - - id: "@switch_vlan[1]" - vlan: "128" +network_swconfig: + - vlan: "128" ports: "0t 6t 1 2 3 4" description: "hoste" - - id: "@switch_vlan[2]" - vlan: "129" + - vlan: "129" ports: "0t 6t" description: "hoste_wifi" - - id: "@switch_vlan[3]" - vlan: "136" + - vlan: "136" ports: "0t 6t" description: "studenti_lan" - - id: "@switch_vlan[4]" - vlan: "137" + - vlan: "137" ports: "0t 6t" description: "studenti_wifi" - - id: "@switch_vlan[5]" - vlan: "144" + - vlan: "144" ports: "0t 6t" description: "ucitele_lan" - - id: "@switch_vlan[6]" - vlan: "145" + - vlan: "145" ports: "0t 6t" description: "ucitele_wifi" - - id: "@switch_vlan[7]" - vlan: "152" + - vlan: "152" ports: "0t 6t" description: "free_wifi" wireless_devices: - id: "{{ device_2g_radio }}" channel: "13" - txpower: "4" + txpower: "8" # wireless_interfaces_override: # - ssid: "aurora" diff --git a/host_vars/ap_c47154393f26.yml b/host_vars/ap_c47154393f26.yml index 04a41eb..094ee8d 100644 --- a/host_vars/ap_c47154393f26.yml +++ b/host_vars/ap_c47154393f26.yml @@ -1,44 +1,36 @@ device_ip_address: "10.11.99.5" device_hostname: "ap-vila-nahore" -network_swconfig_switch_vlans: - - id: "@switch_vlan[0]" - vlan: "99" +network_swconfig: + - vlan: "99" ports: "0t 6t 2t" description: "mgmnt" - - id: "@switch_vlan[1]" - vlan: "128" + - vlan: "128" ports: "0t 6t 1 2t 3 4" description: "hoste" - - id: "@switch_vlan[2]" - vlan: "129" + - vlan: "129" ports: "0t 6t 2t" description: "hoste_wifi" - - id: "@switch_vlan[3]" - vlan: "136" + - vlan: "136" ports: "0t 6t 2t" description: "studenti_lan" - - id: "@switch_vlan[4]" - vlan: "137" + - vlan: "137" ports: "0t 6t 2t" description: "studenti_wifi" - - id: "@switch_vlan[5]" - vlan: "144" + - vlan: "144" ports: "0t 6t 2t" description: "ucitele_lan" - - id: "@switch_vlan[6]" - vlan: "145" + - vlan: "145" ports: "0t 6t 2t" description: "ucitele_wifi" - - id: "@switch_vlan[7]" - vlan: "152" + - vlan: "152" ports: "0t 6t 2t" description: "free_wifi" wireless_devices: - id: "{{ device_2g_radio }}" channel: "8" - txpower: "4" + txpower: "8" # wireless_interfaces_override: # - ssid: "aurora" diff --git a/host_vars/ap_c87f54de81d8.yml b/host_vars/not_ap_c87f54de81d8.yml similarity index 100% rename from host_vars/ap_c87f54de81d8.yml rename to host_vars/not_ap_c87f54de81d8.yml diff --git a/inventory.yml b/inventory.yml index 3e2e2b5..56470d9 100644 --- a/inventory.yml +++ b/inventory.yml @@ -5,14 +5,18 @@ openwrt: accessPoints: vars: ansible_scp_extra_args: "-O" - hosts: - # ap_c47154394838: - # ansible_host: "10.11.99.2" - ap_b04e26bbc7e3: - ansible_host: "10.11.99.3" - ap_0c806307e88a: - ansible_host: "10.11.99.4" - ap_c47154393f26: - ansible_host: "10.11.99.5" - ap_c47154391634: - ansible_host: "10.11.99.6" \ No newline at end of file + children: + dsa: + hosts: + ap_107c61992bd8: + ansible_host: "10.11.99.2" + swconfig: + hosts: + ap_b04e26bbc7e3: + ansible_host: "10.11.99.3" + ap_0c806307e88a: + ansible_host: "10.11.99.4" + ap_c47154393f26: + ansible_host: "10.11.99.5" + ap_c47154391634: + ansible_host: "10.11.99.6" \ No newline at end of file diff --git a/roles/network/handlers/main.yml b/roles/network/handlers/main.yml index 11ab20f..aa73749 100644 --- a/roles/network/handlers/main.yml +++ b/roles/network/handlers/main.yml @@ -1,5 +1,6 @@ --- -# Reload network service using nohup +# Reload network service - name: Reload network - nohup: - command: /etc/init.d/network restart \ No newline at end of file + ansible.builtin.service: + name: network + state: reloaded \ No newline at end of file diff --git a/roles/network/tasks/device.yml b/roles/network/tasks/device.yml index b5532d9..2da45bb 100644 --- a/roles/network/tasks/device.yml +++ b/roles/network/tasks/device.yml @@ -1,42 +1,33 @@ --- # Set state status for network device -- name: Set state status for network device {{ item.id | default('@device[-1]') }} +- name: Set state status for network device {{ item.name }} ansible.builtin.set_fact: network_device_state: "{{ item.state | default('present') }}" # Delete network device -- name: Delete network device {{ item.id }} +- name: Delete network device {{ item.name }} when: "'absent' in network_device_state" uci: command: "absent" config: "network" - section: "{{ item.id }}" type: "device" + find: + name: "{{ item.name | mandatory }}" # Create and configure network device - name: Create and configure network device when: "'present' in network_device_state" - block: - # Create network device - - name: Create network device {{ item.id | default('@device[-1]') }} - uci: - command: "add" - config: "network" - section: "{{ item.id | default('@device[-1]') }}" - type: "device" - - # Configure network device - - name: Configure network device {{ item.id | default('@device[-1]') }} - uci: - command: "set" - config: "network" - section: "{{ item.id | default('@device[-1]') }}" - type: "device" - value: - name: "{{ item.name | default(omit) }}" - type: "{{ item.type | default(omit) }}" - ports: "{{ item.ports | default([]) | join(' ') }}" - stp: "{{ item.stp | default(omit) }}" - vlan: "{{ item.vlan | default(omit) }}" - igmp_snooping: "{{ item.igmp_snooping | default(omit) }}" - ipv6: "{{ item.ipv6 | default(omit) }}" + uci: + command: "section" + config: "network" + type: "device" + find: + name: "{{ item.name | default(omit) }}" + value: + type: "{{ item.type | default(omit) }}" + ports: "{{ item.ports | default([]) | join(' ') }}" + stp: "{{ item.stp | default(omit) }}" + vlan: "{{ item.vlan | default(omit) }}" + igmp_snooping: "{{ item.igmp_snooping | default(omit) }}" + ipv6: "{{ item.ipv6 | default(omit) }}" + replace: "yes" \ No newline at end of file diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml index ced6c81..9427a2e 100644 --- a/roles/network/tasks/main.yml +++ b/roles/network/tasks/main.yml @@ -4,22 +4,22 @@ when: network_globals is defined ansible.builtin.include_tasks: globals.yml -# Configure swconfig switch vlan section -- name: Configure swconfig switch vlan section - ansible.builtin.include_tasks: switch_swconfig.yml - when: network_swconfig_switch_vlans is defined - loop: "{{ network_swconfig_switch_vlans | default([]) }}" - -# Configure dsa switch vlan section -- name: Configure dsa switch vlan section - ansible.builtin.include_tasks: switch_dsa.yml - when: network_dsa_switch_vlans is defined - loop: "{{ network_dsa_switch_vlans | default([]) }}" +# Configure swconfig vlan section +- name: Configure swconfig vlan section + ansible.builtin.include_tasks: swconfig.yml + when: network_swconfig is defined + loop: "{{ network_swconfig | default([]) }}" # Configure device section - name: Configure device section ansible.builtin.include_tasks: device.yml - loop: "{{ network_devices | default([]) }}" + loop: "{{ network_devices | default([]) + network_devices_append | default([]) }}" + +# Configure dsa switch vlan section +- name: Configure dsa switch vlan section + ansible.builtin.include_tasks: vlan_filtering.yml + when: network_bridge_vlan_filtering is defined + loop: "{{ network_bridge_vlan_filtering | default([]) }}" # Configure interface section - name: Configure interface section @@ -40,4 +40,16 @@ - name: Apply changes and reload network uci: command: commit - notify: Reload network \ No newline at end of file + +# Reload network service +- name: Reload network + nohup: + command: /etc/init.d/network restart +# Update device ip address +- name: Update device ip address + set_fact: + ansible_host: "{{ device_ip_address }}" + when: device_ip_address is defined +- name: Wait target connection to become reachable/usable + ansible.builtin.wait_for_connection: + timeout: 30 \ No newline at end of file diff --git a/roles/network/tasks/swconfig.yml b/roles/network/tasks/swconfig.yml new file mode 100644 index 0000000..1476179 --- /dev/null +++ b/roles/network/tasks/swconfig.yml @@ -0,0 +1,31 @@ +--- +# Set state status for switch vlan +- name: Set state status for switch vlan {{ item.vlan }} + ansible.builtin.set_fact: + switch_vlan_state: "{{ item.state | default('present') }}" + +# Delete switch vlan +- name: Delete switch vlan {{ item.vlan }} + when: "'absent' in switch_vlan_state" + uci: + command: "absent" + config: "network" + type: "switch_vlan" + find: + vlan: "{{ item.vlan | mandatory }}" + +# Create and configure switch vlan +- name: Create and configure switch vlan + when: "'present' in switch_vlan_state" + uci: + command: "section" + config: "network" + type: "switch_vlan" + find: + vlan: "{{ item.vlan | mandatory }}" + value: + device: "{{ item.device | default('switch0') }}" + vid: "{{ item.vid | default(item.vlan | default(omit)) }}" + ports: "{{ item.ports | default([]) }}" + description: "{{ item.description | default(omit) }}" + replace: "yes" \ No newline at end of file diff --git a/roles/network/tasks/switch_dsa.yml b/roles/network/tasks/switch_dsa.yml deleted file mode 100644 index 144c3d0..0000000 --- a/roles/network/tasks/switch_dsa.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -# Set state status for switch vlan -- name: Set state status for switch vlan {{ item.id | default('@switch_vlan[-1]') }} - ansible.builtin.set_fact: - switch_vlan_state: "{{ item.state | default('present') }}" - -# Delete switch vlan -- name: Delete switch vlan {{ item.id }} - when: "'absent' in switch_vlan_state" - uci: - command: "absent" - config: "network" - section: "{{ item.id }}" - type: "switch_vlan" - -# Create and configure switch vlan -- name: Create and configure switch vlan - when: "'present' in switch_vlan_state" - block: - # Create switch vlan - - name: Create switch vlan {{ item.id | default('@switch_vlan[-1]') }} - uci: - command: "add" - config: "network" - section: "{{ item.id | default('@switch_vlan[-1]') }}" - type: "switch_vlan" - - # Configure switch vlan - - name: Configure switch vlan {{ item.id | default('@switch_vlan[-1]') }} - uci: - command: "set" - config: "network" - section: "{{ item.id | default('@switch_vlan[-1]') }}" - type: "switch_vlan" - value: - device: "{{ item.device | default('switch0') }}" - vlan: "{{ item.vlan | mandatory }}" - vid: "{{ item.vid | default(item.vlan | default(omit)) }}" - ports: "{{ item.ports | default([]) }}" - description: "{{ item.description | default(omit) }}" \ No newline at end of file diff --git a/roles/network/tasks/switch_swconfig.yml b/roles/network/tasks/switch_swconfig.yml deleted file mode 100644 index 144c3d0..0000000 --- a/roles/network/tasks/switch_swconfig.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -# Set state status for switch vlan -- name: Set state status for switch vlan {{ item.id | default('@switch_vlan[-1]') }} - ansible.builtin.set_fact: - switch_vlan_state: "{{ item.state | default('present') }}" - -# Delete switch vlan -- name: Delete switch vlan {{ item.id }} - when: "'absent' in switch_vlan_state" - uci: - command: "absent" - config: "network" - section: "{{ item.id }}" - type: "switch_vlan" - -# Create and configure switch vlan -- name: Create and configure switch vlan - when: "'present' in switch_vlan_state" - block: - # Create switch vlan - - name: Create switch vlan {{ item.id | default('@switch_vlan[-1]') }} - uci: - command: "add" - config: "network" - section: "{{ item.id | default('@switch_vlan[-1]') }}" - type: "switch_vlan" - - # Configure switch vlan - - name: Configure switch vlan {{ item.id | default('@switch_vlan[-1]') }} - uci: - command: "set" - config: "network" - section: "{{ item.id | default('@switch_vlan[-1]') }}" - type: "switch_vlan" - value: - device: "{{ item.device | default('switch0') }}" - vlan: "{{ item.vlan | mandatory }}" - vid: "{{ item.vid | default(item.vlan | default(omit)) }}" - ports: "{{ item.ports | default([]) }}" - description: "{{ item.description | default(omit) }}" \ No newline at end of file diff --git a/roles/network/tasks/vlan_filtering.yml b/roles/network/tasks/vlan_filtering.yml new file mode 100644 index 0000000..7cfcebb --- /dev/null +++ b/roles/network/tasks/vlan_filtering.yml @@ -0,0 +1,29 @@ +--- +# Set state status for vlan filtering +- name: Set state status for switch vlan {{ item.vlan }} + ansible.builtin.set_fact: + switch_vlan_state: "{{ item.state | default('present') }}" + +# Delete vlan filtering +- name: Delete switch vlan {{ item.vlan }} + when: "'absent' in switch_vlan_state" + uci: + command: "absent" + config: "network" + type: "bridge-vlan" + find: + vlan: "{{ item.vlan | mandatory }}" + +# Create and configure vlan filtering +- name: Create and configure switch vlan + when: "'present' in switch_vlan_state" + uci: + command: "section" + config: "network" + type: "bridge-vlan" + find: + vlan: "{{ item.vlan | mandatory }}" + value: + device: "{{ item.device | mandatory }}" + ports: "{{ item.ports | default([]) }}" + replace: "yes" \ No newline at end of file diff --git a/setupAllAPs.yml b/setupAllAPs.yml index 1e20edb..55a1c31 100644 --- a/setupAllAPs.yml +++ b/setupAllAPs.yml @@ -18,6 +18,10 @@ opkg: name: prometheus-node-exporter-lua state: present + - name: Install prometheus-node-exporter-lua-hostapd_stations + opkg: + name: prometheus-node-exporter-lua-hostapd_stations + state: present - name: Configure prometheus-node-exporter-lua uci: command: section @@ -28,7 +32,7 @@ listen_interface: mgmnt listen_port: 9100 autocommit: true - # - name: Reboot device - # ansible.builtin.command: - # cmd: "reboot" - # changed_when: false + - name: Reboot device + ansible.builtin.command: + cmd: "reboot" + changed_when: false