ソースを参照

Lots of work to get dhcp integrated and thins more reliable

Till Klocke 9 年 前
コミット
95938c1b53

+ 2 - 1
roles/ff-supernode/defaults/main.yml

@@ -1,3 +1,4 @@
 ---
 ---
 # defaults file for ff-supernode
 # defaults file for ff-supernode
-supernode_local_ip: ansible_default_ipv4.address
+supernode_local_ip: ansible_default_ipv4.address
+supernode_mesh_net_ip:

+ 3 - 1
roles/ff-supernode/meta/main.yml

@@ -1,7 +1,7 @@
 ---
 ---
 galaxy_info:
 galaxy_info:
   author: Till Klocke
   author: Till Klocke
-  description: Installs a Freifunk Supernide
+  description: Installs a Freifunk Supernode
   company: Freifunk Dortmund
   company: Freifunk Dortmund
   # If the issue tracker for your role is not on github, uncomment the
   # If the issue tracker for your role is not on github, uncomment the
   # next line and provide a value
   # next line and provide a value
@@ -29,3 +29,5 @@ dependencies:
 - fastd
 - fastd
 - batman
 - batman
 - bird
 - bird
+- supernode-interfaces
+- pdellaert.dhcp_server

+ 0 - 5
roles/ff-supernode/tasks/debian.yml

@@ -1,8 +1,3 @@
-- name: Install network config
-  when: supernode_interfaces is defined
-  template: src=interfaces.j2 dest=/etc/network/interfaces
-  notify: Restart network
-
 - name: Make sure necessary tools are installed
 - name: Make sure necessary tools are installed
   apt: name={{item}} state=present
   apt: name={{item}} state=present
   with_items:
   with_items:

+ 22 - 0
roles/ff-supernode/vars/main.yml

@@ -1,2 +1,24 @@
 ---
 ---
 # vars file for ff-supernode
 # vars file for ff-supernode
+
+dhcp_interfaces: bat0
+dhcp_common_default_lease_time: 600
+dhcp_common_max_lease_time: 7200
+dhcp_common_ddns_update_style: none
+dhcp_common_authoritative: true
+dhcp_common_log_facility: local7
+dhcp_common_options:
+  - wpad code 252 = text
+  - 'wpad "\n\000"'
+  - interface-mtu 1280
+dhcp_subnets:
+  - base: "{{supernode_mesh_net_base_ip}}"
+    netmask: "{{supernode_mesh_netmask_ipv4}}"
+    routers: "{{supernode_mesh_ipv4}}"
+    domain_nameservers: "{{supernode_mesh_ipv4}}, {{supernode_other_nameserver}}"
+    ntp_servers: "{{supernode_mesh_ipv4}}, {{supernode_other_ntp_server}}"
+dhcp_classes:
+  - name: MSFT
+    rule: 'match if substring(option vendor-class-identifier, 0, 4) = "MSFT"'
+    options:
+      - opt: 'dhcp-parameter-request-list = concat(option dhcp-parameter-request-list, fc)'