diff --git a/files/dhcpd.conf.j2 b/files/dhcpd.conf.j2 index 060cced..d23aa06 100644 --- a/files/dhcpd.conf.j2 +++ b/files/dhcpd.conf.j2 @@ -11,8 +11,4 @@ option domain-name-servers {{ sn_mesh_IPv4 }}, {{ sn_dhcp_dns }}; option routers {{ sn_dhcp_router }}; interface bat0; } -host database { - hardware ethernet 5e:51:68:d6:6a:69; - fixed-address 10.188.1.27; -} - +include "/opt/freifunk/static-dhcp/static.conf"; diff --git a/install.sn.yml b/install.sn.yml index a043eb2..2c7809b 100644 --- a/install.sn.yml +++ b/install.sn.yml @@ -9,7 +9,7 @@ user: root gather_facts: False vars: - snversion: master_v1.9.1 + snversion: master_v1.9.3 batmanversion: v2015.2 common_required_packages: - git @@ -40,6 +40,7 @@ - htop - psmisc - dnsutils + - ntp modules_required: - batman-adv - nf_conntrack_netlink @@ -108,6 +109,8 @@ apt: state=installed pkg={{ item }} with_items: common_required_packages register: aptupdates + - name: Set clock + shell: ntpd -q -g - name: Add modules lineinfile: dest=/etc/modules line={{ item }} with_items: modules_required @@ -197,6 +200,15 @@ - name: Copy dhcpd template file template: src=./files/dhcpd.conf.j2 dest=/etc/dhcp/dhcpd.conf owner=root group=root mode=0444 register: dhcpd + + - name: Clone static DHCP config + git: repo=https://github.com/Freifunk-Troisdorf/static-dhcp + dest=/opt/freifunk/static-dhcp + when: dhcpd.changed + - name: Add cron static DHCP + cron: name=StaticDHCP minute="*" job="/opt/freifunk/static-dhcp/dhcp-update.sh" + when: dhcpd.changed + - name: Restart dhcpd service: name=isc-dhcp-server state=restarted when: dhcpd.changed