Browse Source

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

FreeBSD wheel group
tags/v0.41.0
Javier Bértoli 7 years ago
parent
commit
daf5e9464f
2 changed files with 22 additions and 5 deletions
  1. +12
    -2
      .kitchen.yml
  2. +10
    -3
      test/integration/default/serverspec/openssl_server_spec.rb

+ 12
- 2
.kitchen.yml View File

- name: ubuntu-14.04 - name: ubuntu-14.04
- name: ubuntu-16.04 - name: ubuntu-16.04
- name: debian-8.5 - name: debian-8.5
- name: freebsd-10.3
driver:
cache_directory: false
- name: freebsd-11.0
driver:
cache_directory: false


provisioner: provisioner:
name: salt_solo name: salt_solo
top.sls: top.sls:
base: base:
'*': '*':
- openssl
openssl.sls:
- openssh
openssh.sls:
sshd_config:
Port: 22
ssh_config:
Port: 22
openssh: openssh:
sshd_config_mode: '600' sshd_config_mode: '600'



+ 10
- 3
test/integration/default/serverspec/openssl_server_spec.rb View File



def service_name() def service_name()
return case os[:family] return case os[:family]
when 'redhat' then 'sshd'
when 'debian', 'ubuntu' then 'ssh' when 'debian', 'ubuntu' then 'ssh'
else 'sshd'
end
end

def root_group()
return case os[:family]
when 'freebsd' then 'wheel'
else 'root'
end end
end end


describe file('/etc/ssh/sshd_config') do describe file('/etc/ssh/sshd_config') do
it { should be_mode 600 } it { should be_mode 600 }
it { should be_owned_by 'root' } it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into root_group() }
end end


describe file('/etc/ssh/ssh_config') do describe file('/etc/ssh/ssh_config') do
it { should be_mode 644 } it { should be_mode 644 }
it { should be_owned_by 'root' } it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into root_group() }
end end


end end

Loading…
Cancel
Save