playbook_provision_accesspoints: change vcs layout

* replace whole config files (instead of adding lines to existing files)
* move config tree beneath `templates/accesspoints`
* just like `gw-core01`
This commit is contained in:
Gregor Michels 2022-09-26 00:58:13 +02:00
parent c00669664e
commit c311163884
4 changed files with 50 additions and 27 deletions

View File

@ -6,34 +6,14 @@
- wifi_ssid: "GU Deutscher Platz"
- wifi_encryption: "none"
tasks:
- name: create clients bridge (vlan)
blockinfile:
path: /etc/config/network
block: |
config interface 'clients'
option type 'bridge'
option ifname 'eth0.2'
notify:
- reload network
- name: create backoffice bridge (vlan)
blockinfile:
path: /etc/config/network
block: |
config interface 'backoffice'
option type 'bridge'
option ifname 'eth0.8'
marker_begin: BACKOFFICE_NETWORK_BEGIN
marker_end: BACKOFFICE_NETWORK_END
notify:
- reload network
- name: configure wireless
- name: provision /etc/config
template:
src: templates/aruba-ap-105_wireless.j2
dest: /etc/config/wireless
src: "{{ item }}"
dest: /etc/config/
with_fileglob:
- "templates/accesspoints/etc/config/*"
notify:
- reload wifi
- "reload {{ item | basename }}"
# current os ships with that package and leaks mac addresses into prometheus
# therefore we nuke it
@ -71,9 +51,14 @@
name: network
state: reloaded
- name: reload wifi
- name: reload wireless
command: wifi reconf
- name: reload system
service:
name: system
state: reloaded
- name: restart prometheus-node-exporter-lua
service:
name: prometheus-node-exporter-lua

View File

@ -0,0 +1,23 @@
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'mgmt'
option device 'eth0'
option proto 'static'
option ipaddr '{{ ip }}'
option netmask '255.255.255.0'
option gateway '10.84.1.1'
list dns '10.84.1.1'
config interface 'clients'
option type 'bridge'
option ifname 'eth0.2'
config interface 'backoffice'
option type 'bridge'
option ifname 'eth0.8'

View File

@ -0,0 +1,15 @@
config system
option ttylogin '0'
option log_size '64'
option urandom_seed '0'
option timezone 'Europe/Berlin'
option hostname '{{ inventory_hostname }}'
config timeserver 'ntp'
option enabled '1'
option enable_server '0'
list server '0.openwrt.pool.ntp.org'
list server '1.openwrt.pool.ntp.org'
list server '2.openwrt.pool.ntp.org'
list server '3.openwrt.pool.ntp.org'