Add dhcpd static configuration and ntp
This commit is contained in:
parent
8c1c6ffeb3
commit
2e6bd7d22e
@ -11,8 +11,4 @@ option domain-name-servers {{ sn_mesh_IPv4 }}, {{ sn_dhcp_dns }};
|
|||||||
option routers {{ sn_dhcp_router }};
|
option routers {{ sn_dhcp_router }};
|
||||||
interface bat0;
|
interface bat0;
|
||||||
}
|
}
|
||||||
host database {
|
include "/opt/freifunk/static-dhcp/static.conf";
|
||||||
hardware ethernet 5e:51:68:d6:6a:69;
|
|
||||||
fixed-address 10.188.1.27;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
user: root
|
user: root
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
vars:
|
vars:
|
||||||
snversion: master_v1.9.1
|
snversion: master_v1.9.3
|
||||||
batmanversion: v2015.2
|
batmanversion: v2015.2
|
||||||
common_required_packages:
|
common_required_packages:
|
||||||
- git
|
- git
|
||||||
@ -40,6 +40,7 @@
|
|||||||
- htop
|
- htop
|
||||||
- psmisc
|
- psmisc
|
||||||
- dnsutils
|
- dnsutils
|
||||||
|
- ntp
|
||||||
modules_required:
|
modules_required:
|
||||||
- batman-adv
|
- batman-adv
|
||||||
- nf_conntrack_netlink
|
- nf_conntrack_netlink
|
||||||
@ -108,6 +109,8 @@
|
|||||||
apt: state=installed pkg={{ item }}
|
apt: state=installed pkg={{ item }}
|
||||||
with_items: common_required_packages
|
with_items: common_required_packages
|
||||||
register: aptupdates
|
register: aptupdates
|
||||||
|
- name: Set clock
|
||||||
|
shell: ntpd -q -g
|
||||||
- name: Add modules
|
- name: Add modules
|
||||||
lineinfile: dest=/etc/modules line={{ item }}
|
lineinfile: dest=/etc/modules line={{ item }}
|
||||||
with_items: modules_required
|
with_items: modules_required
|
||||||
@ -197,6 +200,15 @@
|
|||||||
- name: Copy dhcpd template file
|
- name: Copy dhcpd template file
|
||||||
template: src=./files/dhcpd.conf.j2 dest=/etc/dhcp/dhcpd.conf owner=root group=root mode=0444
|
template: src=./files/dhcpd.conf.j2 dest=/etc/dhcp/dhcpd.conf owner=root group=root mode=0444
|
||||||
register: dhcpd
|
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
|
- name: Restart dhcpd
|
||||||
service: name=isc-dhcp-server state=restarted
|
service: name=isc-dhcp-server state=restarted
|
||||||
when: dhcpd.changed
|
when: dhcpd.changed
|
||||||
|
Loading…
Reference in New Issue
Block a user