Version information
Start using this module
Add this module to your Puppetfile:
mod 'jhoblitt-mdadm', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
Puppet mdadm Module
Table of Contents
Overview
Manages the mdadm
util for Linux software RAID arrays
Description
This module installs the
mdadm
package for the management of Linux Software RAID arrays, and provides limited
configuration support. Specifically, this module does not presently provide
any support for the creation, modification, or removal of md
arrays.
Management is limited to configuring monitoring of pre-existing md
arrays,
and array health checks.
Usage
Examples
Simple
include ::mdadm
Set mdmonitor
email address
class { '::mdadm':
config_file_options => { 'mailaddr' => 'root' },
}
Classes
mdadm
# defaults
class { '::mdadm':
config_file_manage => true,
config_file_options => {},
force_service => false,
service_ensure => 'running',
service_enable => true,
raid_check_manage => true
raid_check_options => {},
}
config_file_manage
Bool
defaults to true
Enables/disables management of the mdadm.conf
configuration file.
config_file_options
Hash
defaults to '{}'
Keyword/value pairs to be set in the mdadm.conf
configuration file.
Currently, mailaddr
is the only supported key. Example:
config_file_options => { 'mailaddr' => 'root' },
force_service
Bool
defaults to false
By default, the mdadm
class will not attempt to start the mdmonitor
service
unless the $::mdadm_arrays
fact lists md
arrays. If this parameter is set to true
the class will always attempt to start the mdmonitor
service.
service_ensure
String
defaults to 'running'
Sets the state of the mdmonitor
service. Valid strings are: 'running',
'stopped'
service_enable
Bool
defaults to 'true'
Enables/disables the mdmonitor
service on boot.
raid_check_manage
Bool
defaults to true
Enables/disables management of the EL specific raid-check
cron task.
raid_check_options
Hash
defaults to '{}'
Keyword/value pairs to be set in the /etc/sysconfig/raid-check
configuration
file. Example:
raid_check_options => {
'ENABLED' => 'yes',
'CHECK' => 'check',
'NICE' => 'low',
'CHECK_DEVS' => '/dev/md0 /dev/md1',
'REPAIR_DEVS' => '/dev/md0',
'SKIP_DEVS' => '/dev/md1',
'MAXCONCURRENT' => '2',
},
Facts
mdadm
Path to the mdadm
executable. Example:
/sbin/mdadm
mdadmversion
Version string of the mdadm
executable. Example:
v3.2.3
mdadm_arrays
A listing of /dev/<foo>
md
devices. Example:
/dev/md0,/dev/md1
Limitations
Tested Platforms
- el6.x
- el5.x
Versioning
This module is versioned according to the Semantic Versioning 2.0.0 specification.
Support
Please log tickets and issues at github
See Also
[Current]
-
36a9d02 - (Joshua Hoblitt) update raid_check_options example in README
-
4f6ea9f - (Joshua Hoblitt) add commented examples to el5 raid-check template
-
to match the style of the current el6 raid-check template
-
0a7502b - (Joshua Hoblitt) update el6 raid-check template
-
add support for the MAXCONCURENT variable introduced in later 6.x mdadm packages
-
0a29969 - (Joshua Hoblitt) fix/suppress linter warnings
-
5d007ed - (Joshua Hoblitt) add el5.x to README tested platforms
-
15ae51e - (Joshua Hoblitt) add mdmonitor email address example to README
-
ef0e227 - (Joshua Hoblitt) merge mdadm_config_spec.rb into mdadm_spec.rb
Since we're now only testing the public API of the mdadm class.
- 5d1b8d3 - (Joshua Hoblitt) add el5.x support for raid_check_options param to mdadm class
- c30edf7 - (Joshua Hoblitt) mv all mdadm param defaults to mdadm::params class
- 9c9b7c7 - (Joshua Hoblitt) add unit tests of mdadm's service_{ensure,enable} params
- 7ba06ea - (Joshua Hoblitt) add raid_check_manage param to mdadm class
- f236b7d - (Joshua Hoblitt) fix broken mdadm force_service param and rename it to service_force
- 73a1f8c - (Joshua Hoblitt) rename mdadm param config_options -> config_file_options
- 844aade - (Joshua Hoblitt) add config_file_manage param to class mdadm
- 9f785e0 - (Joshua Hoblitt) remove API documentation from .pp files
Refer to the README for all parameter documentation.
- e80f45a - (Joshua Hoblitt) fail on unsupported $::operatingsystemmajrelease
- make mdadm::config & mdadm::raid_check private classes
- fc1cf37 - (Joshua Hoblitt) fix README example formatting
- b90f6fe - (Joshua Hoblitt) update README ToC
- 70eaabb - (Joshua Hoblitt) add basic README info
- 28cecec - (Joshua Hoblitt) prune mdadmversion fact value
Instead of returning the literal string returned by mdadm --version
,
parse out and return only the version number.
- a0dbd6b - (Joshua Hoblitt) replace rspec-system with beaker
- 00a6e53 - (Joshua Hoblitt) restore travis augeas package setup
- 788355f - (Joshua Hoblitt) fixing rspec-puppet to < 1.0
due to these issues:
-
826ec4c - (Joshua Hoblitt) update to rspec >= 1 syntax
To suppress: DEPRECATION: include_class is deprecated. Use contain_class instead
- 414fb5d - (Joshua Hoblitt) update copyright notice year (-2014)
- f6ac329 - (Joshua Hoblitt) update travis matrix
- 52e57a8 - (Joshua Hoblitt) update .gitignore
- c53dde2 - (Joshua Hoblitt) enable managements of mdmonitor service
- bee45b3 - (Joshua Hoblitt) validate params to mdadm::raid_check
- c90515b - (Joshua Hoblitt) change mdadm::config mailaddr param into an hash
- d7f1875 - (Joshua Hoblitt) mv spec/classes/ -> spec/unit/classes/
- 5e76a45 - (Joshua Hoblitt) add mdadm_arrays fact
- 172ae55 - (Joshua Hoblitt) add mdadmversion fact
- 4675af2 - (Joshua Hoblitt) ignore git .swp files
- 54e6247 - (Joshua Hoblitt) add mdadm fact
- 1b1e846 - (Joshua Hoblitt) stub out mdadm::config class
- 1ab3714 - (Joshua Hoblitt) implement anchor pattern
- 3938fcf - (Joshua Hoblitt) add mdmonitor service
- 95bc3f7 - (Joshua Hoblitt) add raid-check configuration
- 02f858e - (Joshua Hoblitt) install mdadm package
- 8438d72 - (Joshua Hoblitt) Merge puppet-module_skel
- 3a20317 - (Joshua Hoblitt) first commit
Dependencies
- puppetlabs/stdlib (>= 3.0.0)
Copyright (C) 2013-2014 Joshua Hoblitt <jhoblitt@cpan.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.