Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gmason/puppet-zfs
  • atomaka/puppet-zfs
2 results
Show changes
Commits on Source (4)
pkg/*
*.swp
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'
......@@ -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
-------
......
......@@ -22,7 +22,9 @@ class zfs::arclimit {
file { '/etc/modprobe.d/zfs.conf':
content => "options zfs zfs_arc_max=$arcsize",
# On large systems, min can default to quite large, overriding max.
content => "options zfs zfs_arc_max=$arcsize
options zfs zfs_arc_min=$arcsize",
mode => 644,
owner => 'root',
group => 'root',
......
......@@ -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.
......@@ -14,7 +16,7 @@
#
# === Examples
#
# class { zfs:
# class { zfs:
# arcpercent => 25,
# }
#
......@@ -24,12 +26,12 @@
#
# === Copyright
#
# Copyright 2013 Michigan State University Board of Trustees
# Copyright 2014 Michigan State University Board of Trustees
# Copyright 2013 Arnaud Gomes-do-Vale
#
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
......@@ -39,17 +41,17 @@ class zfs ( $arcpercent = '25', $arcsize_mb = '0' ) {
package { 'zfs-release':
ensure => present,
provider => rpm,
source => 'http://archive.zfsonlinux.org/epel/zfs-release-1-2.el6.noarch.rpm',
# different URLs are given for different versions of EL.
# See http://zfsonlinux.org/epel.html for more info.
source => "http://archive.zfsonlinux.org/epel/zfs-release.el${::operatingsystemmajrelease}.noarch.rpm",
} ->
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']
}
}
......@@ -61,17 +63,20 @@ class zfs ( $arcpercent = '25', $arcsize_mb = '0' ) {
ensure => installed,
} ~>
package { 'ubuntu-zfs':
ensure => present,
notify => Class['dkms'],
ensure => present,
notify => Class['dkms'],
require => Apt::Ppa ['ppa:zfs-native/stable'],
}
# We explicitly run dkms to build the ZFS modules for the currently-running
# kernel. Otherwise ZFS won't work until an apt-get upgrade.
# We explicitly run dkms to build the ZFS modules for the currently
# running kernel. Otherwise ZFS won't work until an apt-get upgrade.
exec { 'zfs_dkms':
require => Class['dkms'],
command => '/etc/kernel/postinst.d/dkms',
creates => "/lib/modules/${kernelrelease}/updates/dkms/zfs.ko"
creates => "/lib/modules/${::kernelrelease}/updates/dkms/zfs.ko"
}
}
default: {
notify("${::operatingsystem} is not supported by the ZFS module")
}
}
}