package: install "nginx" package when OS isn't recognized
This will provide broader OS compatibility without having to manually add support for specific OSes.
This commit is contained in:
parent
3cec62042e
commit
4eea8c7397
2 changed files with 3 additions and 5 deletions
|
@ -90,10 +90,8 @@ class nginx::package(
|
|||
}
|
||||
}
|
||||
default: {
|
||||
case $::operatingsystem {
|
||||
default: {
|
||||
fail("Module ${module_name} is not supported on ${::operatingsystem}")
|
||||
}
|
||||
package { 'nginx':
|
||||
ensure => $package_ensure,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,6 +111,6 @@ describe 'nginx::package' do
|
|||
|
||||
context 'other' do
|
||||
let(:facts) {{ :operatingsystem => 'xxx', :osfamily => 'linux' }}
|
||||
it { expect { subject }.to raise_error(Puppet::Error, /Module nginx is not supported on xxx/) }
|
||||
it { is_expected.to contain_package('nginx') }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue