diff --git a/ansible/environments/jail/host_vars/nat_dhcp b/ansible/environments/jail/host_vars/nat_dhcp index e69de29..1d0b6d9 100644 --- a/ansible/environments/jail/host_vars/nat_dhcp +++ b/ansible/environments/jail/host_vars/nat_dhcp @@ -0,0 +1 @@ +os_flavor: "freebsd" diff --git a/ansible/roles/jail_nat_dhcp/files/dhcpd.conf b/ansible/roles/jail_nat_dhcp/files/dhcpd.conf new file mode 100644 index 0000000..36d1f19 --- /dev/null +++ b/ansible/roles/jail_nat_dhcp/files/dhcpd.conf @@ -0,0 +1,12 @@ +# 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; +} diff --git a/ansible/roles/jail_nat_dhcp/files/rc.conf b/ansible/roles/jail_nat_dhcp/files/rc.conf new file mode 100644 index 0000000..cfa78b1 --- /dev/null +++ b/ansible/roles/jail_nat_dhcp/files/rc.conf @@ -0,0 +1,3 @@ +ifconfig_host_link3="inet 10.213.177.254 netmask 255.255.255.0" +defaultrouter="10.213.177.1" +dhcpd_enable="YES" diff --git a/ansible/roles/jail_nat_dhcp/files/resolv.conf b/ansible/roles/jail_nat_dhcp/files/resolv.conf new file mode 100644 index 0000000..582d17e --- /dev/null +++ b/ansible/roles/jail_nat_dhcp/files/resolv.conf @@ -0,0 +1,2 @@ +search home.arpa +nameserver 10.213.177.1 diff --git a/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml b/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml index b417174..b98022f 100644 --- a/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml +++ b/ansible/roles/jail_nat_dhcp/tasks/freebsd.yaml @@ -1,5 +1,20 @@ -# - name: Install packages -# package: -# name: -# - foo -# state: present +- name: Install packages + package: + name: + - dhcpd + state: present + +- name: Install Configuration + copy: + src: "files/{{ item.src }}" + dest: "{{ item.dest }}" + mode: 0644 + owner: root + group: wheel + loop: + - src: rc.conf + dest: /etc/rc.conf + - src: dhcpd.conf + dest: /usr/local/etc/dhcpd.conf + - src: resolv.conf + dest: /etc/resolv.conf