Commit 55ab5146 authored by mh's avatar mh
Browse files

new style for 2.7

parent 9b122500
......@@ -14,12 +14,12 @@
class modprobe {
file{'/etc/modprobe.conf':
source => [
"puppet:///modules/site-modprobe/$fqdn/modprobe.conf",
"puppet:///modules/site-modprobe/$virtual/modprobe.conf",
"puppet:///modules/site-modprobe/$operatingsystem/modprobe.conf",
"puppet:///modules/site-modprobe/modprobe.conf",
"puppet:///modules/modprobe/$virtual/modprobe.conf",
"puppet:///modules/modprobe/$operatingsystem/modprobe.conf",
"puppet:///modules/site_modprobe/${::fqdn}/modprobe.conf",
"puppet:///modules/site_modprobe/${::virtual}/modprobe.conf",
"puppet:///modules/site_modprobe/${::operatingsystem}/modprobe.conf",
"puppet:///modules/site_modprobe/modprobe.conf",
"puppet:///modules/modprobe/${::virtual}/modprobe.conf",
"puppet:///modules/modprobe/${::operatingsystem}/modprobe.conf",
"puppet:///modules/modprobe/modprobe.conf",
],
owner => root, group => 0, mode => 0644;
......
define modprobe::kern_module(
$ensure = 'present'
){
line{"module_${name}":
line => $operatingsystem ? {
file_line{"module_${name}":
line => $::operatingsystem ? {
debian => $name,
ubuntu => $name,
default => "/sbin/modprobe $name"
},
file => $operatingsystem ? {
path => $::operatingsystem ? {
debian => '/etc/modules',
ubuntu => '/etc/modules',
default => '/etc/rc.modules'
......@@ -16,13 +16,13 @@ define modprobe::kern_module(
}
case $ensure {
present: {
exec{"/sbin/modprobe $name":
unless => "/bin/grep -q '^$name ' /proc/modules"
exec{"/sbin/modprobe ${name}":
unless => "/bin/grep -q '^${name} ' /proc/modules"
}
}
absent: {
exec{"/sbin/modprobe -r $name":
onlyif => "/bin/grep -q '^$name ' /proc/modules"
exec{"/sbin/modprobe -r ${name}":
onlyif => "/bin/grep -q '^${name} ' /proc/modules"
}
}
default: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment