From 31171ee947a3910392fe506c41a048102a50b258 Mon Sep 17 00:00:00 2001
From: Greg Mason <gmason@msu.edu>
Date: Tue, 25 Nov 2014 18:41:27 -0500
Subject: [PATCH] update puppet-zfs to 2.0

removing dkms module may break some existing installations, as
dkms service is no longer managed

preliminary, incomplete EL7 support added.
---
 Modulefile        |  6 ++----
 README.md         |  3 +++
 manifests/init.pp | 12 ++++++------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Modulefile b/Modulefile
index f97c81b..a320e8d 100644
--- a/Modulefile
+++ b/Modulefile
@@ -1,10 +1,8 @@
 name    'gmason-zfs'
-version '1.0.0'
+version '2.0.0'
 source 'https://gitlab.msu.edu/gmason/puppet-zfs'
 author 'gmason'
 license 'GPLv3'
 summary 'ZFS Puppet module'
-description 'This module installs ZFS from http://zfsonlinux.org/ on Linux hosts. It does not manage pools, just the kernel-level support.'
+description 'This module installs ZFS from http://zfsonlinux.org/ on Linux hosts. It does not manage pools, just the kernel-level support. It requires EPEL to be installed on the system, but does not have opinions on how you do that. RHEL/CentOS/Scientific Linux 7 support is currently incomplete.'
 project_page 'https://gitlab.msu.edu/gmason/puppet-zfs'
-
-dependency 'gmason/dkms', '>= 0.0.3'
diff --git a/README.md b/README.md
index dd51be5..bd3df1a 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@ zfs
 ===
 
 This puppet module installs ZFS on Linux on either Ubuntu or a RHEL derivative (CentOS, Scientific Linux, etc).
+EL 7 support is incomplete at this time.
 
 The puppetlabs/apt module is not listed as a dependency, as RHEL shops certainly won't need it. It is required for Ubuntu.
 
@@ -9,6 +10,8 @@ Facter 1.7 or higher is needed to for automatic configuration of the ARC size. T
 
 The system should probably have 1GB or more of ram.
 
+Version 2 removes the dependency for the dkms puppet module.
+
 License
 -------
 
diff --git a/manifests/init.pp b/manifests/init.pp
index bc14f07..3269fb3 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -3,6 +3,8 @@
 # This module installs ZFS from http://zfsonlinux.org/ on Linux hosts. It
 # does not manage pools, just the kernel-level support.
 #
+# RHEL/CentOS/SL 7 support is incomplete at the moment.
+#
 # === Parameters
 #
 # None.
@@ -29,7 +31,7 @@
 #
 class zfs ( $arcpercent = '25', $arcsize_mb = '0' ) {
 
-  include dkms
+# include dkms
   # comment out the following include to not manage the size of the ARC.
   include zfs::arclimit
 
@@ -45,13 +47,11 @@ class zfs ( $arcpercent = '25', $arcsize_mb = '0' ) {
         } ->
         package { 'zfs':
           ensure => present,
-          notify => Class['dkms'],
         } ~>
         service { 'zfs':
-          ensure    => running,
-          enable    => true,
-          subscribe => Class['dkms'],
-          require   => File['/etc/modprobe.d/zfs.conf']
+          ensure  => running,
+          enable  => true,
+          require => File['/etc/modprobe.d/zfs.conf']
         }
       }
 
-- 
GitLab