forked from jhoblitt/puppet-udev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add udev package installation support
- Loading branch information
Joshua Hoblitt
committed
Sep 19, 2013
1 parent
738cea0
commit b6821fe
Showing
5 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# == Class: udev::params | ||
# | ||
# This class should be considered private. | ||
# | ||
class udev::params { | ||
$udev_package = 'udev' | ||
|
||
case $::osfamily { | ||
'redhat': {} | ||
default: { | ||
fail("Module ${module_name} is not supported on ${::operatingsystem}") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'spec_helper' | ||
|
||
describe 'udev::params', :type => :class do | ||
describe 'for osfamily RedHat' do | ||
let(:facts) {{ :osfamily => 'RedHat' }} | ||
|
||
it { should include_class('udev::params') } | ||
end | ||
|
||
describe 'unsupported osfamily' do | ||
let :facts do | ||
{ | ||
:osfamily => 'Debian', | ||
:operatingsystem => 'Debian', | ||
} | ||
end | ||
|
||
it 'should fail' do | ||
expect { should include_class('udev::params') }. | ||
to raise_error(Puppet::Error, /not supported on Debian/) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters