Files
ansible-labb-wifi/roles/netconfig/tasks/setup_network.yml
Martin Kennedy 26ef6cdc33 feat: Separate network/wifi/dhcp into separate yaml; disable dhcp
- "disable dhcp" -- erasing /etc/config/dhcp will / should also
prevent odhcpcd from starting.

For: issue #6
2026-04-26 18:02:47 -04:00

32 lines
672 B
YAML

---
- name: Setup network devices
uci:
command: section
config: network
type: device
find_by:
name: "{{ item.name }}"
value:
type: "{{ item.type }}"
ports: "{{ item.ports }}"
stp: "{{ item.stp | default() }}"
loop: "{{ network['device'] }}"
- name: Setup network interfaces
uci:
command: section
config: network
type: interface
name: "{{ item.key }}"
value:
device: "{{ item.device }}"
proto: "{{ item.proto }}"
ifname: "{{ item.ifname | default() }}"
loop: "{{ network['interface'] }}"
- name: commit changes
uci:
command: commit
key: network
notify: restart network