Sha256: 0ac58fa4a9c7b88442edab420566a110d819787a081a50b526d4df9b95c3c5bd
Contents?: true
Size: 1.01 KB
Versions: 6
Compression:
Stored size: 1.01 KB
Contents
# encoding: utf-8 # based on operating system we select the available service if ['centos', 'fedora', 'freebsd', 'opensuse'].include?(os[:family]) # CentOS, Fedora unavailable_service = 'ssh' available_service = 'sshd' elsif ['debian'].include?(os[:family]) # Debian unavailable_service = 'clamav' available_service = 'ssh' elsif ['ubuntu'].include?(os[:family]) # Ubuntu unavailable_service = 'sshd' available_service = 'ssh' elsif ['windows'].include?(os[:family]) # Ubuntu unavailable_service = 'sshd' available_service = 'dhcp' end describe service(unavailable_service) do it { should_not be_enabled } it { should_not be_installed } it { should_not be_running } end describe service(available_service) do it { should be_enabled } it { should be_installed } it { should be_running } end # extra test for ubuntu upstart with systemv service if os[:family] == 'ubuntu' describe service('ntp') do it { should be_enabled } it { should be_installed } it { should be_running } end end
Version data entries
6 entries across 6 versions & 1 rubygems