Merge pull request #91 from amendlik/freebsd-wheel-group

FreeBSD wheel group
This commit is contained in:
Javier Bértoli 2017-04-21 18:52:02 -03:00 committed by GitHub
commit daf5e9464f
2 changed files with 22 additions and 5 deletions

View File

@ -8,6 +8,12 @@ platforms:
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: debian-8.5
- name: freebsd-10.3
driver:
cache_directory: false
- name: freebsd-11.0
driver:
cache_directory: false
provisioner:
name: salt_solo
@ -19,8 +25,12 @@ provisioner:
top.sls:
base:
'*':
- openssl
openssl.sls:
- openssh
openssh.sls:
sshd_config:
Port: 22
ssh_config:
Port: 22
openssh:
sshd_config_mode: '600'

View File

@ -3,8 +3,15 @@ set :backend, :exec
def service_name()
return case os[:family]
when 'redhat' then 'sshd'
when 'debian', 'ubuntu' then 'ssh'
else 'sshd'
end
end
def root_group()
return case os[:family]
when 'freebsd' then 'wheel'
else 'root'
end
end
@ -17,13 +24,13 @@ describe 'openssl/config.sls' do
describe file('/etc/ssh/sshd_config') do
it { should be_mode 600 }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into root_group() }
end
describe file('/etc/ssh/ssh_config') do
it { should be_mode 644 }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into root_group() }
end
end