diff options
author | Adam Jahn <ajjahn@gmail.com> | 2015-12-07 16:18:42 -0500 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2015-12-07 16:18:42 -0500 |
commit | f2e9e5f32e0af0d83d8380b94decc522ff87fa30 (patch) | |
tree | 48b794ef7f379e878d39a8b16b0ad2d3e694677a | |
parent | 95cb988077ec2f5c79e4a2bd67d4b252fdc8739c (diff) | |
download | puppet-samba-f2e9e5f32e0af0d83d8380b94decc522ff87fa30.tar.gz puppet-samba-f2e9e5f32e0af0d83d8380b94decc522ff87fa30.tar.bz2 |
Add support for Debian 8. closes #47
-rw-r--r-- | manifests/server/params.pp | 12 | ||||
-rw-r--r-- | spec/acceptance/nodesets/debian-81-x64.yml | 12 | ||||
-rw-r--r-- | spec/classes/samba__server__service_spec.rb | 14 |
3 files changed, 31 insertions, 7 deletions
diff --git a/manifests/server/params.pp b/manifests/server/params.pp index 5f2fc3e..ba0c1be 100644 --- a/manifests/server/params.pp +++ b/manifests/server/params.pp @@ -3,12 +3,14 @@ class samba::server::params { case $::osfamily { 'Redhat': { $service_name = 'smb' } - - #On Debian family: Debian 7 => samba , Ubuntu => smbd - #Others, I don't know, hope 'samba' will works 'Debian': { - case $::operatingsystem{ - 'Debian': { $service_name = 'samba' } + case $::operatingsystem { + 'Debian': { + case $::operatingsystemmajrelease { + '8' : { $service_name = 'smbd' } + default: { $service_name = 'samba' } + } + } 'Ubuntu': { $service_name = 'smbd' $nmbd_name = 'nmbd' } default: { $service_name = 'samba' } diff --git a/spec/acceptance/nodesets/debian-81-x64.yml b/spec/acceptance/nodesets/debian-81-x64.yml new file mode 100644 index 0000000..3b1d8aa --- /dev/null +++ b/spec/acceptance/nodesets/debian-81-x64.yml @@ -0,0 +1,12 @@ +HOSTS: + debian-81-x64: + roles: + - master + platform: debian-8-amd64 + box: lazyfrosch/debian-8-jessie-amd64-puppet + box_url: https://vagrantcloud.com/lazyfrosch/boxes/debian-8-jessie-amd64-puppet + hypervisor: vagrant + +CONFIG: + log_level: verbose + type: foss diff --git a/spec/classes/samba__server__service_spec.rb b/spec/classes/samba__server__service_spec.rb index ada7f21..4352ec2 100644 --- a/spec/classes/samba__server__service_spec.rb +++ b/spec/classes/samba__server__service_spec.rb @@ -7,8 +7,18 @@ describe 'samba::server::service' do it { should contain_service('samba').with_require('Class[Samba::Server::Config]') } context 'Debian' do - let(:facts) {{ :osfamily => 'Debian', :operatingsystem => 'Debian' }} - it { should contain_service('samba') } + context 'wheezy' do + let(:facts) {{ :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemmajrelease => '7' }} + it { should contain_service('samba') } + end + context 'jessie' do + let(:facts) {{ :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemmajrelease => '8' }} + it { should contain_service('smbd') } + end end context 'Ubuntu' do |