- name: devices
run_list:
- recipe[devices::default]
+ - name: dhcpd
+ run_list:
+ - recipe[dhcpd::default]
+ attributes:
+ dhcpd:
+ first_address: 172.18.100.1
+ last_address: 172.18.100.254
+ networking:
+ interfaces:
+ test:
+ interface: eth0
+ role: internal
+ address: 172.18.0.2
+ prefix: 16
+ gateway: 172.18.0.1
+ roles:
+ external:
+ zone: test
- name: exim
run_list:
- recipe[exim::default]
- name: "Test Kitchen (devices)"
script:
- bundle exec kitchen test devices-ubuntu-1804
+ - name: "Test Kitchen (dhcpd)"
+ script:
+ - bundle exec kitchen test dhcpd-ubuntu-1804
- name: "Test Kitchen (exim)"
script:
- bundle exec kitchen test exim-ubuntu-1804
version "1.0.0"
supports "ubuntu"
depends "networking"
+depends "ntp"
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("isc-dhcp-server") do
+ it { should be_installed }
+end
+
+describe service("isc-dhcp-server") do
+ it { should be_enabled }
+ it { should be_running }
+end
+
+describe port(67) do
+ it { should be_listening.with("udp") }
+end