aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/subnet.pp4
-rw-r--r--spec/defines/dhcp_subnet_spec.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/manifests/subnet.pp b/manifests/subnet.pp
index b70a233..e7c72dd 100644
--- a/manifests/subnet.pp
+++ b/manifests/subnet.pp
@@ -64,8 +64,8 @@ define dhcp::subnet(
}
$ensure_shared = $is_shared ? {
- true => $ensure,
- false => 'absent',
+ true => 'absent',
+ false => $ensure,
}
concat::fragment {"dhcp.subnet.${name}":
ensure => $ensure_shared,
diff --git a/spec/defines/dhcp_subnet_spec.rb b/spec/defines/dhcp_subnet_spec.rb
index 48ab71b..b679551 100644
--- a/spec/defines/dhcp_subnet_spec.rb
+++ b/spec/defines/dhcp_subnet_spec.rb
@@ -161,7 +161,9 @@ describe 'dhcp::subnet' do
) }
it { should contain_concat__fragment('dhcp.subnet.1.2.3.4').with(
- :ensure => 'absent'
+ :ensure => 'present',
+ :target => '/etc/dhcp/dhcpd.conf',
+ :content => "include \"/etc/dhcp/subnets/1.2.3.4.conf\";\n"
) }
it { should contain_concat__fragment('dhcp.subnet.1.2.3.4.hosts').with(
@@ -185,9 +187,7 @@ describe 'dhcp::subnet' do
} }
it { should contain_concat__fragment('dhcp.subnet.1.2.3.4').with(
- :ensure => 'present',
- :target => '/etc/dhcp/dhcpd.conf',
- :content => "include \"/etc/dhcp/subnets/1.2.3.4.conf\";\n"
+ :ensure => 'absent'
) }
end