diff --git a/ansible/roles/jail_nat_dhcp/files/dhcpd.conf b/ansible/roles/jail_nat_dhcp/files/dhcpd.conf deleted file mode 100644 index aa36935..0000000 --- a/ansible/roles/jail_nat_dhcp/files/dhcpd.conf +++ /dev/null @@ -1,13 +0,0 @@ -# option definitions common to all supported networks... -option domain-name "home.arpa"; -# option domain-name-servers ns1.home.arpa; -option subnet-mask 255.255.255.0; -default-lease-time 600; -max-lease-time 7200; - -subnet 10.213.177.0 netmask 255.255.255.0 { - range 10.213.177.10 10.213.177.250; - option broadcast-address 10.213.177.255; - option routers 10.213.177.1; - option domain-name-servers 10.213.177.1; -} diff --git a/ansible/roles/jail_nat_dhcp/files/kea-dhcp4.conf b/ansible/roles/jail_nat_dhcp/files/kea-dhcp4.conf new file mode 100644 index 0000000..9e09e7f --- /dev/null +++ b/ansible/roles/jail_nat_dhcp/files/kea-dhcp4.conf @@ -0,0 +1,25 @@ +{ + "Dhcp4": { + "interfaces-config": { + "interfaces": [ "jailnat_dhcp" ] + }, + "subnet4": [ + { + "subnet": "10.215.1.0/24", + "pools": [ { "pool": "10.215.1.10-10.215.1.250" } ], + "option-data": [ + { + "name": "routers", + "data": "10.215.1.1" + } + ] + } + ], + "option-data": [ + { + "name": "domain-name-servers", + "data": "10.215.1.1" + } + ] + } +} diff --git a/ansible/roles/jail_nat_dhcp/files/rc.conf b/ansible/roles/jail_nat_dhcp/files/rc.conf index cfa78b1..e0d493a 100644 --- a/ansible/roles/jail_nat_dhcp/files/rc.conf +++ b/ansible/roles/jail_nat_dhcp/files/rc.conf @@ -1,3 +1,3 @@ -ifconfig_host_link3="inet 10.213.177.254 netmask 255.255.255.0" -defaultrouter="10.213.177.1" -dhcpd_enable="YES" +ifconfig_jailnat_dhcp="inet 10.215.1.254 netmask 255.255.255.0" +defaultrouter="10.215.1.1" +kea_enable="YES" diff --git a/ansible/roles/jail_nat_dhcp/files/resolv.conf b/ansible/roles/jail_nat_dhcp/files/resolv.conf index 582d17e..c21685a 100644 --- a/ansible/roles/jail_nat_dhcp/files/resolv.conf +++ b/ansible/roles/jail_nat_dhcp/files/resolv.conf @@ -1,2 +1,2 @@ search home.arpa -nameserver 10.213.177.1 +nameserver 10.215.1.1 diff --git a/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml b/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml index b98022f..0ce13f0 100644 --- a/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml +++ b/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml @@ -1,7 +1,7 @@ - name: Install packages package: name: - - dhcpd + - kea state: present - name: Install Configuration @@ -14,7 +14,7 @@ loop: - src: rc.conf dest: /etc/rc.conf - - src: dhcpd.conf - dest: /usr/local/etc/dhcpd.conf + - src: kea-dhcp4.conf + dest: /usr/local/etc/kea/kea-dhcp4.conf - src: resolv.conf dest: /etc/resolv.conf