Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a65696289 |
@@ -5,16 +5,12 @@ wifi_iface:
|
||||
mode: 'ap'
|
||||
encryption: 'psk2'
|
||||
key: 'password'
|
||||
skip_inactivity_poll: '1'
|
||||
disassoc_low_ack: '0'
|
||||
ieee80211k: 1
|
||||
ieee80211r: 1
|
||||
ieee80211v: 1
|
||||
bss_transition: 1
|
||||
|
||||
vgo: &vgo_wifi_iface
|
||||
<<: *default_wifi_iface
|
||||
network: 'vgolan'
|
||||
skip_inactivity_poll: '1'
|
||||
disassoc_low_ack: '0'
|
||||
key: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
63626332663164663666656466373031633564663435646531663331666262626265656335646364
|
||||
@@ -31,21 +27,11 @@ wifi_iface:
|
||||
<<: *vgo_wifi_iface
|
||||
ssid: 'Vermont Green Offices 5G'
|
||||
|
||||
vgo2n:
|
||||
<<: *vgo_wifi_iface
|
||||
ssid: 'Vermont Green Offices'
|
||||
|
||||
vgo5n:
|
||||
<<: *vgo_wifi_iface
|
||||
ssid: 'Vermont Green Offices'
|
||||
|
||||
vgo5c:
|
||||
<<: *vgo_wifi_iface
|
||||
ssid: 'Vermont Green Offices 5AC'
|
||||
ieee80211k: 0
|
||||
ieee80211r: 0
|
||||
ieee80211v: 0
|
||||
bss_transition: 0
|
||||
mesh: &mesh_wifi_iface
|
||||
ssid:
|
||||
mode: 'mesh'
|
||||
encryption: 'psk2+ccmp'
|
||||
skip_inactivity_poll:
|
||||
|
||||
labb: &labb_wifi_iface
|
||||
<<: *default_wifi_iface
|
||||
@@ -59,9 +45,15 @@ wifi_iface:
|
||||
3163343464646535370a636331383863653137646636343831643961633633333536393539643861
|
||||
62326536343964333331653966663931313438333161626533393235373232626265
|
||||
|
||||
labbwpa3: &labb_wifi_iface_wpa3
|
||||
labbmesh:
|
||||
<<: *labb_wifi_iface
|
||||
encryption: 'sae'
|
||||
<<: *mesh_wifi_iface
|
||||
mesh_id: 'Laboratory B_Mesh'
|
||||
|
||||
vgomesh2:
|
||||
<<: *vgo_wifi_iface
|
||||
<<: *mesh_wifi_iface
|
||||
mesh_id: 'Vermont Green Offices 2G_Mesh'
|
||||
|
||||
wifi_device:
|
||||
|
||||
@@ -69,38 +61,12 @@ wifi_device:
|
||||
channel: auto
|
||||
country: US
|
||||
disabled: 0
|
||||
log_level: 0
|
||||
|
||||
qca9880_5:
|
||||
<<: *default_wifi_device
|
||||
band: 5g
|
||||
htmode: VHT80
|
||||
|
||||
mt761x_2:
|
||||
<<: *default_wifi_device
|
||||
band: 2g
|
||||
htmode: VHT20
|
||||
|
||||
mt761x_5:
|
||||
<<: *default_wifi_device
|
||||
band: 5g
|
||||
htmode: VHT80
|
||||
|
||||
mt791x_2:
|
||||
<<: *default_wifi_device
|
||||
band: 2g
|
||||
htmode: HE20
|
||||
|
||||
mt791x_5:
|
||||
<<: *default_wifi_device
|
||||
band: 5g
|
||||
htmode: HE80
|
||||
|
||||
mt7916_6:
|
||||
<<: *default_wifi_device
|
||||
band: 6g
|
||||
htmode: HE160
|
||||
|
||||
ath9k_2:
|
||||
<<: *default_wifi_device
|
||||
band: 2g
|
||||
552
inventory.yml
552
inventory.yml
@@ -1,56 +1,6 @@
|
||||
templates:
|
||||
package_ath10k_mesh: &package_ath10k_mesh
|
||||
- name: kmod-ath10k-ct
|
||||
state: absent
|
||||
- name: ath10k-firmware-qca988x-ct
|
||||
state: absent
|
||||
- name: kmod-ath10k
|
||||
state: present
|
||||
- name: ath10k-firmware-qca988x
|
||||
state: present
|
||||
|
||||
package_ath10k_99x0_full: &package_ath10k_99x0_full
|
||||
- name: kmod-ath10k-ct
|
||||
state: present
|
||||
- name: ath10k-firmware-qca99x0-ct
|
||||
state: absent
|
||||
- name: ath10k-firmware-qca99x0-ct-full-htt
|
||||
state: present
|
||||
|
||||
package_wpad_mesh: &package_wpad_mesh
|
||||
- name: wpad-basic-wolfssl
|
||||
state: absent
|
||||
- name: wpad-mesh-wolfssl
|
||||
state: absent
|
||||
- name: wpad-basic-mbedtls
|
||||
state: absent
|
||||
- name: wpad-mesh-mbedtls
|
||||
state: absent
|
||||
- name: wpad-wolfssl
|
||||
state: present
|
||||
|
||||
# Note: This is intentionally a duplicate of package_wpad_mesh --
|
||||
# need to manually test migration of other devices to an actual
|
||||
# wpad-mesh-wolfssl (or similar) variant.
|
||||
package_wpad_full: &package_wpad_full
|
||||
- name: wpad-basic-wolfssl
|
||||
state: absent
|
||||
- name: wpad-mesh-wolfssl
|
||||
state: absent
|
||||
- name: wpad-wolfssl
|
||||
state: present
|
||||
- name: wpad-basic-mbedtls
|
||||
state: absent
|
||||
- name: wpad-mesh-mbedtls
|
||||
state: absent
|
||||
|
||||
openwrt:
|
||||
hosts:
|
||||
|
||||
ap3825i7:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
|
||||
ap3825i2.lan:
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
@@ -63,7 +13,6 @@ openwrt:
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
@@ -76,18 +25,26 @@ openwrt:
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: ath9k_5
|
||||
channel: 149
|
||||
template: qca9880_5
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 11
|
||||
|
||||
wifi_iface:
|
||||
- ifname: vgo2
|
||||
device: radio1
|
||||
template: vgo2
|
||||
disabled: 1
|
||||
|
||||
- ifname: vgo5
|
||||
device: radio0
|
||||
template: vgo5
|
||||
disabled: 1
|
||||
|
||||
# What if I added comments?
|
||||
- ifname: labb2
|
||||
device: radio1
|
||||
template: labb
|
||||
@@ -96,39 +53,19 @@ openwrt:
|
||||
device: radio0
|
||||
template: labb
|
||||
|
||||
- ifname: vgo2
|
||||
device: radio1
|
||||
template: vgo2
|
||||
|
||||
- ifname: vgo5
|
||||
device: radio0
|
||||
template: vgo5
|
||||
|
||||
- ifname: vgo2n
|
||||
device: radio1
|
||||
template: vgo2n
|
||||
|
||||
- ifname: vgo5n
|
||||
device: radio0
|
||||
template: vgo5n
|
||||
|
||||
ap3825i8:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
|
||||
ap3825i3.lan:
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
- eth1
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
@@ -141,412 +78,97 @@ openwrt:
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: ath9k_5
|
||||
template: qca9880_5
|
||||
channel: 157
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 1
|
||||
|
||||
wifi_iface:
|
||||
- ifname: vgo2
|
||||
device: radio1
|
||||
template: vgo2
|
||||
|
||||
- ifname: vgo5
|
||||
device: radio0
|
||||
template: vgo5
|
||||
|
||||
- ifname: labb2
|
||||
device: radio1
|
||||
template: labb
|
||||
|
||||
- ifname: labb5
|
||||
device: radio0
|
||||
template: labb
|
||||
|
||||
mr16_3.lan:
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
stp: 1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
- name: radio0
|
||||
path: pci0000:00/0000:00:11.0
|
||||
template: ath9k_2
|
||||
hwmode: 11n
|
||||
band:
|
||||
channel: 6
|
||||
|
||||
wifi_iface:
|
||||
- ifname: labb2
|
||||
device: radio1
|
||||
template: labb
|
||||
|
||||
- ifname: labb5
|
||||
device: radio0
|
||||
template: labb
|
||||
|
||||
- ifname: vgo2
|
||||
device: radio1
|
||||
template: vgo2
|
||||
|
||||
- ifname: vgo5
|
||||
device: radio0
|
||||
template: vgo5
|
||||
|
||||
- ifname: vgo2n
|
||||
device: radio1
|
||||
template: vgo2n
|
||||
|
||||
- ifname: vgo5n
|
||||
device: radio0
|
||||
template: vgo5n
|
||||
|
||||
ap3825i9:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: ath9k_5
|
||||
channel: 161
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 1
|
||||
|
||||
wifi_iface:
|
||||
- ifname: labb2
|
||||
device: radio1
|
||||
template: labb
|
||||
|
||||
- ifname: labb5
|
||||
device: radio0
|
||||
template: labb
|
||||
|
||||
- ifname: vgo2
|
||||
device: radio1
|
||||
template: vgo2
|
||||
|
||||
- ifname: vgo5
|
||||
device: radio0
|
||||
template: vgo5
|
||||
|
||||
- ifname: vgo2n
|
||||
device: radio1
|
||||
template: vgo2n
|
||||
|
||||
- ifname: vgo5n
|
||||
device: radio0
|
||||
template: vgo5n
|
||||
|
||||
ap3825i4:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: ath9k_5
|
||||
channel: 36
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 1
|
||||
|
||||
wifi_iface:
|
||||
- ifname: labb2
|
||||
device: radio1
|
||||
template: labb
|
||||
|
||||
- ifname: labb5
|
||||
device: radio0
|
||||
template: labb
|
||||
|
||||
- ifname: vgo2
|
||||
device: radio1
|
||||
template: vgo2
|
||||
|
||||
- ifname: vgo5
|
||||
device: radio0
|
||||
template: vgo5
|
||||
|
||||
- ifname: vgo2n
|
||||
device: radio1
|
||||
template: vgo2n
|
||||
|
||||
- ifname: vgo5n
|
||||
device: radio0
|
||||
template: vgo5n
|
||||
|
||||
ap3825i6:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
path: pci0000:00/0000:00:12.0
|
||||
template: ath9k_5
|
||||
hwmode: 11n
|
||||
band:
|
||||
channel: 48
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 11
|
||||
|
||||
wifi_iface:
|
||||
- ifname: labb2
|
||||
- ifname: vgo5
|
||||
device: radio1
|
||||
template: vgo5
|
||||
disabled: 0
|
||||
|
||||
- ifname: vgomesh2
|
||||
device: radio0
|
||||
template: vgomesh2
|
||||
disabled: 0
|
||||
|
||||
- ifname: labb2
|
||||
device: radio0
|
||||
template: labb
|
||||
|
||||
- ifname: labb5
|
||||
device: radio0
|
||||
device: radio1
|
||||
template: labb
|
||||
|
||||
- ifname: vgo2
|
||||
- ifname: labbmesh2
|
||||
device: radio0
|
||||
template: labbmesh
|
||||
|
||||
- ifname: labbmesh5
|
||||
device: radio1
|
||||
template: vgo2
|
||||
template: labbmesh
|
||||
|
||||
- ifname: vgo5
|
||||
device: radio0
|
||||
template: vgo5
|
||||
|
||||
- ifname: vgo2n
|
||||
device: radio1
|
||||
template: vgo2n
|
||||
|
||||
- ifname: vgo5n
|
||||
device: radio0
|
||||
template: vgo5n
|
||||
|
||||
ap3825i10:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
ath10k: *package_ath10k_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: qca9880_5
|
||||
channel: 157
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 1
|
||||
|
||||
wifi_iface:
|
||||
- ifname: vgo5c
|
||||
device: radio0
|
||||
template: vgo5c
|
||||
|
||||
ap3825i11:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
ath10k: *package_ath10k_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: qca9880_5
|
||||
channel: 157
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 1
|
||||
|
||||
wifi_iface:
|
||||
- ifname: vgo5c
|
||||
device: radio0
|
||||
template: vgo5c
|
||||
|
||||
ap3825i12:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
ath10k: *package_ath10k_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: qca9880_5
|
||||
channel: 157
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 1
|
||||
|
||||
wifi_iface:
|
||||
- ifname: vgo5c
|
||||
device: radio0
|
||||
template: vgo5c
|
||||
|
||||
ap3825i13:
|
||||
packages:
|
||||
wpad: *package_wpad_mesh
|
||||
ath10k: *package_ath10k_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
- name: br-lan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0
|
||||
- eth1
|
||||
|
||||
- name: br-vgolan
|
||||
type: bridge
|
||||
ports:
|
||||
- eth0.2
|
||||
- eth1.2
|
||||
|
||||
interface:
|
||||
- key: lan
|
||||
device: br-lan
|
||||
proto: dhcp
|
||||
|
||||
- key: vgolan
|
||||
device: br-vgolan
|
||||
proto: dhcp
|
||||
|
||||
wireless:
|
||||
wifi_device:
|
||||
- name: radio0
|
||||
path: ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0
|
||||
template: qca9880_5
|
||||
channel: 157
|
||||
|
||||
- name: radio1
|
||||
path: ffe09000.pcie/pci9000:00/9000:00:00.0/9000:01:00.0
|
||||
template: ath9k_2
|
||||
channel: 1
|
||||
|
||||
wifi_iface:
|
||||
- ifname: vgo5c
|
||||
device: radio0
|
||||
template: vgo5c
|
||||
# What if I added comments?
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
- name: Reload dropbear
|
||||
service:
|
||||
name: dropbear
|
||||
state: reloaded
|
||||
enabled: yes
|
||||
@@ -1,2 +0,0 @@
|
||||
dependencies:
|
||||
- role: gekmihesg.openwrt
|
||||
@@ -1,49 +0,0 @@
|
||||
- name: Setup hostname
|
||||
when: inventory_hostname is defined
|
||||
uci:
|
||||
command: set
|
||||
key: 'system.@system[0]'
|
||||
value:
|
||||
hostname: "{{ inventory_hostname }}"
|
||||
|
||||
- name: Setup timezone
|
||||
uci:
|
||||
command: set
|
||||
key: 'system.@system[0]'
|
||||
value:
|
||||
timezone: "{{ timezone | default(system[template | default('default')].timezone) }}"
|
||||
zonename: "{{ zonename | default(system[template | default('default')].zonename) }}"
|
||||
log_ip: "{{ log_ip | default(system[template | default('default')].log_ip) }}"
|
||||
log_port: "{{ log_port | default(system[template | default('default')].log_port) }}"
|
||||
log_proto: "{{ log_proto | default(system[template | default('default')].log_proto) }}"
|
||||
|
||||
- name: commit changes
|
||||
uci:
|
||||
command: commit
|
||||
key: system
|
||||
|
||||
- name: Update authorized keys
|
||||
lineinfile:
|
||||
path: /etc/dropbear/authorized_keys
|
||||
line: "{{ item }}"
|
||||
state: present
|
||||
create: yes
|
||||
mode: 644
|
||||
loop:
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBEysezzehXkUOm8u8nXP+YloSE8JpKYevCslao5tB2l root@neo"
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILCYhh9Fjo8bV5rV6UfvwDgR+NlmCfKuR14iXgmILeDj hurricos@bielik"
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPh3R8BXv9geqJMaxi134Y5hcOVZPQ/rfghjszYMFG5z hurricos@zephyr"
|
||||
|
||||
- name: Disable Root password authentication
|
||||
uci:
|
||||
command: set
|
||||
key: "dropbear.@dropbear[0]"
|
||||
value:
|
||||
RootPasswordAuth: "off"
|
||||
PasswordAuth: "off"
|
||||
notify: reload dropbear
|
||||
|
||||
- name: Commit changes
|
||||
uci:
|
||||
command: commit
|
||||
key: dropbear
|
||||
@@ -1,8 +0,0 @@
|
||||
system:
|
||||
|
||||
default: &default_system
|
||||
timezone: 'EST5EDT,M3.2.0,M11.1.0'
|
||||
zonename: 'America/New York'
|
||||
log_ip: 10.0.7.226
|
||||
log_proto: tcp
|
||||
log_port: 514
|
||||
@@ -1,2 +0,0 @@
|
||||
dependencies:
|
||||
- role: gekmihesg.openwrt
|
||||
@@ -1,88 +0,0 @@
|
||||
- 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
|
||||
|
||||
- name: Tear down the default wifi-iface(s)
|
||||
uci:
|
||||
config: wireless
|
||||
command: absent
|
||||
section: "{{ item }}"
|
||||
loop:
|
||||
- default_radio0
|
||||
- default_radio1
|
||||
|
||||
- name: Setup wireless devices (radios)
|
||||
uci:
|
||||
command: section
|
||||
config: wireless
|
||||
type: wifi-device
|
||||
find_by:
|
||||
path: "{{ item.path }}"
|
||||
name: "{{ item.name }}"
|
||||
value:
|
||||
type: "mac80211" # they'd BETTER be.
|
||||
band: "{{ item.band | default(wifi_device[item.template].band) | default() }}"
|
||||
channel: "{{ item.channel | default(wifi_device[item.template].channel) }}"
|
||||
country: "{{ item.country | default(wifi_device[item.template].country) }}"
|
||||
disabled: "{{ item.disabled | default(wifi_device[item.template].disabled) }}"
|
||||
hwmode: "{{ item.hwmode | default(wifi_device[item.template].hwmode) | default() }}"
|
||||
htmode: "{{ item.htmode | default(wifi_device[item.template].htmode) }}"
|
||||
log_level: "{{ item.log_level | default(wifi_device[item.template].log_level) | default() }}"
|
||||
loop: "{{ wireless['wifi_device'] }}"
|
||||
|
||||
- name: Setup wireless ifaces (VIFs)
|
||||
uci:
|
||||
command: section
|
||||
config: wireless
|
||||
type: wifi-iface
|
||||
name: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') }}"
|
||||
value:
|
||||
ifname: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') if not item.force_ifnameless | default(false) }}"
|
||||
mode: "{{ item.mode | default(wifi_iface[item.template].mode) }}"
|
||||
device: "{{ item.device | default(wifi_iface[item.template].device) }}"
|
||||
network: "{{ item.network | default(wifi_iface[item.template].network) }}"
|
||||
ssid: "{{ item.ssid | default(wifi_iface[item.template].ssid) | default() }}"
|
||||
bss_transition: "{{ item.bss_transition | default(wifi_iface[item.template].bss_transition) | default() }}"
|
||||
ieee80211k: "{{ item.ieee80211k | default(wifi_iface[item.template].ieee80211k) | default() }}"
|
||||
ieee80211r: "{{ item.ieee80211r | default(wifi_iface[item.template].ieee80211r) | default() }}"
|
||||
ieee80211v: "{{ item.ieee80211v | default(wifi_iface[item.template].ieee80211v) | default() }}"
|
||||
mesh_id: "{{ item.mesh_id | default(wifi_iface[item.template].mesh_id) | default() }}"
|
||||
encryption: "{{ item.encryption | default(wifi_iface[item.template].encryption) }}"
|
||||
key: "{{ item.key | default(wifi_iface[item.template].key) }}"
|
||||
disabled: "{{ item.disabled | default(wifi_iface[item.template].disabled) | default(0) }}"
|
||||
skip_inactivity_poll: "{{ item.skip_inactivity_poll | default(wifi_iface[item.template].skip_inactivity_poll) | default() }}"
|
||||
disassoc_low_ack: "{{ item.disassoc_low_ack | default(wifi_iface[item.template].disassoc_low_ack) | default() }}"
|
||||
loop: "{{ wireless['wifi_iface'] }}"
|
||||
|
||||
- name: commit changes
|
||||
uci:
|
||||
command: commit
|
||||
key: wireless
|
||||
notify: reload wifi
|
||||
@@ -1,17 +0,0 @@
|
||||
- name: Touch a file
|
||||
command:
|
||||
argv:
|
||||
- touch
|
||||
- /tmp/test_proof
|
||||
|
||||
- name: Restart prometheus-ucode
|
||||
service:
|
||||
name: prometheus-node-exporter-ucode
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
||||
- name: Restart prometheus-lua
|
||||
service:
|
||||
name: prometheus-node-exporter-lua
|
||||
state: restarted
|
||||
enabled: yes
|
||||
@@ -1,2 +0,0 @@
|
||||
dependencies:
|
||||
- role: gekmihesg.openwrt
|
||||
@@ -1,86 +0,0 @@
|
||||
- name: Install the correct wpad packages
|
||||
opkg:
|
||||
name: "{{ item.name }}"
|
||||
state: "{{ item.state }}"
|
||||
loop: "{{ packages.wpad | default([]) }}"
|
||||
notify: "{{ item.notify | default([]) }}"
|
||||
register: wpad_config
|
||||
|
||||
- name: Reload wpad
|
||||
nohup:
|
||||
command: "wifi down; /etc/init.d/wpad restart; wifi up"
|
||||
delay: 10
|
||||
when:
|
||||
- wpad_config.changed
|
||||
|
||||
- name: Wait for connection after netpkg reconfig
|
||||
wait_for_connection:
|
||||
timeout: 70
|
||||
delay: 5
|
||||
when:
|
||||
- wpad_config.changed
|
||||
- openwrt_wait_for_connection
|
||||
|
||||
- name: Install the correct ath10k packages
|
||||
opkg:
|
||||
name: "{{ item.name }}"
|
||||
state: "{{ item.state }}"
|
||||
loop: "{{ packages.ath10k | default([]) }}"
|
||||
notify: "{{ item.notify | default([]) }}"
|
||||
|
||||
# - name: Install prometheus-ucode packages
|
||||
# opkg:
|
||||
# name: "{{ item }}"
|
||||
# state: present
|
||||
# loop:
|
||||
# - prometheus-node-exporter-ucode
|
||||
# - prometheus-node-exporter-ucode-wifi
|
||||
# - prometheus-node-exporter-ucode-netstat
|
||||
# - prometheus-node-exporter-ucode-openwrt
|
||||
# notify: Restart prometheus-ucode
|
||||
|
||||
# - name: Setup prometheus-ucode properly
|
||||
# uci:
|
||||
# command: set
|
||||
# key: 'prometheus-node-exporter-ucode.main'
|
||||
# value:
|
||||
# listen_interface: 'lan'
|
||||
# notify: Restart prometheus-ucode
|
||||
|
||||
# - name: commit changes to prometheus-node-exporter-ucode
|
||||
# uci:
|
||||
# command: commit
|
||||
# key: prometheus-node-exporter-ucode
|
||||
|
||||
- name: Install prometheus-lua packages
|
||||
opkg:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- prometheus-node-exporter-lua
|
||||
- prometheus-node-exporter-lua-wifi
|
||||
- prometheus-node-exporter-lua-wifi_stations
|
||||
- prometheus-node-exporter-lua-hostapd_stations
|
||||
- prometheus-node-exporter-lua-hostapd_ubus_stations
|
||||
- prometheus-node-exporter-lua-netstat
|
||||
- prometheus-node-exporter-lua-dawn
|
||||
notify: Restart prometheus-lua
|
||||
|
||||
- name: Setup prometheus-lua properly
|
||||
uci:
|
||||
command: set
|
||||
key: 'prometheus-node-exporter-lua.main'
|
||||
value:
|
||||
listen_interface: 'lan'
|
||||
notify: Restart prometheus-lua
|
||||
|
||||
- name: commit changes to prometheus-node-exporter-lua
|
||||
uci:
|
||||
command: commit
|
||||
key: prometheus-node-exporter-lua
|
||||
|
||||
- name: Install dawn
|
||||
opkg:
|
||||
name: dawn
|
||||
state: present
|
||||
|
||||
@@ -1,5 +1,78 @@
|
||||
- hosts: openwrt
|
||||
roles:
|
||||
- config
|
||||
- netpkgconfig
|
||||
- netconfig
|
||||
- gekmihesg.openwrt
|
||||
tasks:
|
||||
|
||||
- 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
|
||||
|
||||
- name: Setup wireless devices (radios)
|
||||
uci:
|
||||
command: section
|
||||
config: wireless
|
||||
type: wifi-device
|
||||
find_by:
|
||||
path: "{{ item.path }}"
|
||||
value:
|
||||
band: "{{ item.band | default(wifi_device[item.template].band) | default() }}"
|
||||
channel: "{{ item.channel | default(wifi_device[item.template].channel) }}"
|
||||
country: "{{ item.country | default(wifi_device[item.template].country) }}"
|
||||
disabled: "{{ item.disabled | default(wifi_device[item.template].disabled) }}"
|
||||
hwmode: "{{ item.hwmode | default(wifi_device[item.template].hwmode) | default() }}"
|
||||
htmode: "{{ item.htmode | default(wifi_device[item.template].htmode) }}"
|
||||
loop: "{{ wireless['wifi_device'] }}"
|
||||
|
||||
- name: Setup wireless ifaces (VIFs)
|
||||
uci:
|
||||
command: section
|
||||
config: wireless
|
||||
type: wifi-iface
|
||||
find:
|
||||
ifname: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') }}"
|
||||
value:
|
||||
ifname: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') }}"
|
||||
mode: "{{ item.mode | default(wifi_iface[item.template].mode) }}"
|
||||
device: "{{ item.device | default(wifi_iface[item.template].device) }}"
|
||||
network: "{{ item.network | default(wifi_iface[item.template].network) }}"
|
||||
ssid: "{{ item.ssid | default(wifi_iface[item.template].ssid) | default() }}"
|
||||
mesh_id: "{{ item.mesh_id | default(wifi_iface[item.template].mesh_id) | default() }}"
|
||||
encryption: "{{ item.encryption | default(wifi_iface[item.template].encryption) }}"
|
||||
key: "{{ item.key | default(wifi_iface[item.template].key) }}"
|
||||
disabled: "{{ item.disabled | default(wifi_iface[item.template].disabled) | default(0) }}"
|
||||
skip_inactivity_poll: "{{ item.skip_inactivity_poll | default(wifi_iface[item.template].skip_inactivity_poll) | default() }}"
|
||||
disassoc_low_ack: "{{ item.disassoc_low_ack | default(wifi_iface[item.template].disassoc_low_ack) | default() }}"
|
||||
loop: "{{ wireless['wifi_iface'] }}"
|
||||
|
||||
- name: commit changes
|
||||
uci:
|
||||
command: commit
|
||||
key: wireless
|
||||
notify: reload wifi
|
||||
|
||||
Reference in New Issue
Block a user