Created
August 26, 2014 08:04
-
-
Save rjsalts/1ce9628fc4e18edd867d to your computer and use it in GitHub Desktop.
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
define loadkmod { | |
exec { "modprobe_$name": | |
command => "/sbin/modprobe ${name}", | |
unless => "/bin/grep \"^${name} \" /proc/modules", | |
} | |
exec { "add_${name}_to_etc_modules" : | |
command => "/bin/bash -c 'echo $name >> /etc/modules'", | |
unless => "/bin/grep ^${name} /etc/modules", | |
} | |
} | |
class loadmodule { | |
$kmod = [ "ip_vs", "xfs" ] | |
loadkmod { $kmod: } | |
} | |
class loadmodule2 { | |
$kmod = [ "ip_vs", "ntfs" ] | |
loadkmod { $kmod: } | |
} | |
include loadmodule | |
include loadmodule2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment