Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6 from mfournier/changes-to-kmod-usage

Changes to kmod usage
  • Loading branch information...
commit da09de3b390df7f0602369a427d230747443aa96 2 parents 91ed39b + 993cbf1
@mfournier mfournier authored
Showing with 18 additions and 31 deletions.
  1. +18 −31 manifests/base.pp
View
49 manifests/base.pp
@@ -58,6 +58,7 @@
ensure => present,
alias => "drbd-module",
require => [ Yumrepo["atrpms-drbd"], File["/etc/yum.repos.d/atrpms-drbd.repo"] ],
+ before => Kmod::Load['drbd'],
}
# Should probably be created by the drbd package, but is not.
@@ -106,6 +107,7 @@
ensure => present,
alias => "drbd-module",
require => Yumrepo["centos-extra-drbd"],
+ before => Kmod::Load['drbd'],
}
}
@@ -135,43 +137,28 @@
package { "drbd8-source":
ensure => present,
- alias => "drbd-module",
+ alias => "drbd-module",
+ before => Kmod::Load['drbd'],
}
}
}
- # Build kernel module, if needed
- case $operatingsystem {
-
- Debian: {
-
- # this module is included in linux-image-* (kernel) package
- kmod::install {'drbd': }
-
- service { "drbd":
- ensure => running,
- hasstatus => true,
- restart => "/etc/init.d/drbd reload",
- enable => true,
- require => [Package["drbd"], Kmod::Install['drbd']],
- }
- }
+ kmod::load {'drbd': }
- default: {
-
- kmod::install {'drbd':
- require => Package["drbd-module"],
- }
-
- service { "drbd":
- ensure => running,
- hasstatus => true,
- restart => "/etc/init.d/drbd reload",
- enable => true,
- require => [Package["drbd"], Kmod::Install['drbd']],
- }
- }
+ augeas { 'remove legacy modprobe.conf install entry':
+ incl => '/etc/modprobe.d/modprobe.conf',
+ lens => 'Modprobe.lns',
+ changes => "rm install[. = 'drbd']",
+ onlyif => "match install[. = 'drbd'] size > 0",
+ before => Kmod::Load['drbd'],
+ }
+ service { "drbd":
+ ensure => running,
+ hasstatus => true,
+ restart => "/etc/init.d/drbd reload",
+ enable => true,
+ require => [Package["drbd"], Kmod::Load['drbd']],
}
# this file just includes other files
Please sign in to comment.
Something went wrong with that request. Please try again.