aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/subnet.pp2
-rw-r--r--spec/defines/dhcp_subnet_spec.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/manifests/subnet.pp b/manifests/subnet.pp
index e7c72dd..1f069af 100644
--- a/manifests/subnet.pp
+++ b/manifests/subnet.pp
@@ -34,6 +34,8 @@ define dhcp::subnet(
$is_shared = false
) {
+ Dhcp::Subnet[$title] ~> Class['dhcp::server::service']
+
include ::dhcp::params
$ip_re = '^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$'
diff --git a/spec/defines/dhcp_subnet_spec.rb b/spec/defines/dhcp_subnet_spec.rb
index b0f7ab7..f3ea284 100644
--- a/spec/defines/dhcp_subnet_spec.rb
+++ b/spec/defines/dhcp_subnet_spec.rb
@@ -3,6 +3,10 @@ require 'spec_helper'
describe 'dhcp::subnet' do
let (:title) { '1.2.3.4' }
+ let(:pre_condition) do
+ "class { '::dhcp::server': }"
+ end
+
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do