package { 'autofs': ensure => installed }
package { 'nfs-common': ensure => installed }
- site::linux_module { 'nfs': }
- site::linux_module { 'nfsv4': }
- site::linux_module { 'autofs4': }
+ base::linux_module { 'nfs': }
+ base::linux_module { 'nfsv4': }
+ base::linux_module { 'autofs4': }
exec { 'autofs reload':
path => '/usr/bin:/usr/sbin:/bin:/sbin',
--- /dev/null
+define base::linux_module ($ensure = present) {
+ if $::kernel == linux {
+ case $ensure {
+ present: {
+ exec { "append_module_${name}":
+ command => "echo '${name}' >> /etc/modules",
+ unless => "grep -q -F -x '${name}' /etc/modules",
+ }
+ }
+ absent: {
+ exec { "remove_module_${name}":
+ command => "sed -i -e'/^${name}\$/d' /etc/modules",
+ onlyif => "grep -q -F -x '${name}' /etc/modules",
+ }
+ }
+ default: { fail ("invalid ensure value ${ensure}") }
+ }
+ }
+}
ensure => installed
}
- site::linux_module { 'tun': }
+ base::linux_module { 'tun': }
file { '/etc/cron.hourly/puppet-cleanup-watcher-pause-file':
source => 'puppet:///modules/ganeti2/cleanup-watcher-pause-file',
# Since we disable module loading after boot, we want to load them all at boot time
$modules = split('af_alg af_key ah4 algif_skcipher ansi_cprng authenc drbg echainiv esp4 ipcomp macvlan macvtap tunnel4 vhost vhost_net xfrm4_mode_tunnel xfrm4_tunnel xfrm6_mode_tunnel xfrm_algo xfrm_ipcomp xfrm_user', ' ') # lint:ignore:140chars
- site::linux_module { $modules: }
+ base::linux_module { $modules: }
}
+++ /dev/null
-define site::linux_module ($ensure = present) {
- if $::kernel == linux {
- case $ensure {
- present: {
- exec { "append_module_${name}":
- command => "echo '${name}' >> /etc/modules",
- unless => "grep -q -F -x '${name}' /etc/modules",
- }
- }
- absent: {
- exec { "remove_module_${name}":
- command => "sed -i -e'/^${name}\$/d' /etc/modules",
- onlyif => "grep -q -F -x '${name}' /etc/modules",
- }
- }
- default: { fail ("invalid ensure value ${ensure}") }
- }
- }
-}
has_role('www_master') or
false {
- site::linux_module { 'tcp_bbr': }
- site::linux_module { 'sch_fq': }
+ base::linux_module { 'tcp_bbr': }
+ base::linux_module { 'sch_fq': }
- site::sysctl { 'puppet-net_core_default_qdisc':
+ base::sysctl { 'puppet-net_core_default_qdisc':
key => 'net.core.default_qdisc',
value => 'fq',
}
- site::sysctl { 'puppet-net_ipv4_tcp_congestion_control':
+ base::sysctl { 'puppet-net_ipv4_tcp_congestion_control':
key => 'net.ipv4.tcp_congestion_control',
value => 'bbr',
}