diff options
author | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-12 15:14:55 +0200 |
---|---|---|
committer | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-12 15:14:55 +0200 |
commit | c0f46562b70777b9a4a39429d94c49e869150c64 (patch) | |
tree | 704909c98dc11bb9206b2c67f3f8557418507a21 | |
parent | 1ad8359dc57c99c1671d7cb41b961c451fb1c22f (diff) | |
download | puppet-dhcp-c0f46562b70777b9a4a39429d94c49e869150c64.tar.gz puppet-dhcp-c0f46562b70777b9a4a39429d94c49e869150c64.tar.bz2 |
Fix inverted logic for $is_shared in dhcp::subnet
-rw-r--r-- | manifests/subnet.pp | 4 | ||||
-rw-r--r-- | spec/defines/dhcp_subnet_spec.rb | 8 |
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 |