From: Christian Pointner Date: Mon, 4 Jun 2018 22:45:23 +0000 (+0200) Subject: ansible: add global network config X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=23867d487ab86bf9feb0817c365698c051abc213;p=noc.git ansible: add global network config --- diff --git a/ansible/group_vars/all/network.yml b/ansible/group_vars/all/network.yml new file mode 100644 index 0000000..a8fc409 --- /dev/null +++ b/ansible/group_vars/all/network.yml @@ -0,0 +1,29 @@ +--- +net: + mgmt: + vlan: 32 + prefix: 192.168.32.0/24 + gw: 192.168.32.254 + dns: + - 192.168.32.254 + offsets: + switches: 200 + accesspoints: 220 + + iot: + vlan: 33 + prefix: 192.168.33.0/24 + gw: 192.168.33.254 + dns: + - 192.168.33.254 + + lan: + vlan: 127 + prefix: 192.168.127.0/24 + gw: 192.168.127.254 + dns: + - 192.168.127.254 + + ff: + vlan: 255 + prefix: 10.12.240.240/28 diff --git a/ansible/host_vars/torwaechter/main.yml b/ansible/host_vars/torwaechter/main.yml index f50f8f9..926b903 100644 --- a/ansible/host_vars/torwaechter/main.yml +++ b/ansible/host_vars/torwaechter/main.yml @@ -100,15 +100,15 @@ openwrt_uci: ipaddr: 127.0.0.1 netmask: 255.0.0.0 - - name: interface 'lan' + - name: interface 'mgmt' options: ifname: eth0 accept_ra: 0 proto: static - ipaddr: 192.168.32.100 - netmask: 255.255.255.0 - gateway: 192.168.32.254 - dns: 192.168.32.254 + ipaddr: "{{ net.mgmt.prefix | ipaddr(100) | ipaddr('address') }}" + netmask: "{{ net.mgmt.prefix | ipaddr('netmask') }}" + gateway: "{{ net.mgmt.gw }}" + dns: "{{ net.mgmt.dns | join(' ') }}" dns_search: realraum.at