Version information
This version is compatible with:
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'jhoblitt-udev', '2.3.0'
Learn more about managing modules with a PuppetfileDocumentation
Puppet udev Module
Table of Contents
- Overview
- Description
- Usage
- Simple
- [Managing
udev
syslog verbosity] (#managing-udev-syslog-verbosity) - Managing
udev
rules - Manually triggering a
udev
device rules reload
- Limitations
- Versioning
- Support
- Contributing
- See Also
Overview
Manages the udev package and device rules
Description
This module installs and manages the
udev
package.
Usage
Simple
This class does not need to be manually included in the manifest when using the
udev::rule
defined type.
include udev
Managing udev
syslog verbosity
Controls the value of udev_log
in udev.conf
and change the runtime syslog
verbosity of the daemon.
class { 'udev': udev_log => 'debug' }
Managing udev
rules
Note that either the content
or source
parameter must be specified unless
ensure
is absent
and that these parameters are mutually exclusive; you can
not specify both.
udev::rule { '60-raw.rules':
ensure => present,
content => 'ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"',
}
As is commonly done with the file
type, you can pass the output of the template()
function to content
.
udev::rule { '99-foo.rules':
ensure => present,
content => template('mymodule/foo.rules.erb'),
}
udev::rule { '99-foo.rules':
ensure => present,
source => "puppet:///modules/${module_name}/foo.rules",
}
udev::rule { '99-foo.rules':
ensure => absent,
}
Manually triggering a udev
device rules reload
file { '/etc/etc/udev/rules.d/99-myfrobnicator.rules':
...
notify => Class['udev::udevadm::trigger'],
}
Limitations
At present, only support for $::osfamily == 'RedHat'
has been implemented.
Adding other Linux distributions should be trivial.
This module currently isn't using puppetlabs-concat
for building up rule
files as that approach presents difficulties in being able to remove an empty
file (one without any fragments).
Tested Platforms
- el6.x
- el5.x
- el7.x
- Debian/Ubuntu
Puppet Version Compatibility
Versions | Puppet 2.7 | Puppet 3.x | Puppet 4.x |
---|---|---|---|
1.x | yes | yes | no |
2.x | no | yes | yes |
Versioning
This module is versioned according to the Semantic Versioning 2.0.0 specification.
Support
Please log tickets and issues at github
Contributing
- Fork it on github
- Make a local clone of your fork
- Create a topic branch. Eg,
feature/mousetrap
- Make/commit changes
- Commit messages should be in imperative tense
- Check that linter warnings or errors are not introduced -
bundle exec rake lint
- Check that
Rspec-puppet
unit tests are not broken and coverage is added for new features -bundle exec rake spec
- Documentation of API/features is updated as appropriate in the README
- If present,
beaker
acceptance tests should be run and potentially updated -bundle exec rake beaker
- When the feature is complete, rebase / squash the branch history as necessary to remove "fix typo", "oops", "whitespace" and other trivial commits
- Push the topic branch to github
- Open a Pull Request (PR) from the topic branch onto parent repo's
master
branch
See Also
[Current]
fixup of #19
- cbdef8e - (Pat Riehecky) Add parameter to udev class to create rules automatically
- eea0992 - (Joshua Hoblitt) Merge pull request #18 from jcpunk/use-params
Use udev::params for default parameter values
bump version to 2.2.0
- cd45749 - (Joshua Hoblitt) bump version to 2.2.0
- 2a30d93 - (Joshua Hoblitt) update jhoblitt email address
- e92236f - (Joshua Hoblitt) update copyright year (2017)
- 7f57d80 - (Joshua Hoblitt) Merge pull request #24 from jhoblitt/plumbing/update
update build/test plumbing
- e22d9ad - (Joshua Hoblitt) add beaker:centos-7-docker to travis matrix
- 408f695 - (Joshua Hoblitt) update beaker plumbing
- b3b2725 - (Joshua Hoblitt) add dockeer based beaker nodesets
- 84334e8 - (Joshua Hoblitt) remove vagrant based beaker nodesets
- d582c95 - (Joshua Hoblitt) update gem set
- c1cc3ae - (Joshua Hoblitt) Merge pull request #22 from nexecook/default_action
explictly use the change action for udevadm trigger
- 5f7b5ab - (Eric Cook) remove ruby < 2.0 testing
- 2f5addf - (Eric Cook) explictly use the change action for udevadm trigger centos 6 defaults to --action=add https://lists.ubuntu.com/archives/ubuntu-devel/2009-January/027260.html https://bugzilla.redhat.com/show_bug.cgi?id=570355
- 87b2e87 - (Pat Riehecky) Use udev::params for default parameter values
- 4abfdeb - (Joshua Hoblitt) Merge pull request #16 from noodle10000/master
Fix params.pp where Fedora release version is checked
- 1dedeb2 - (Craig Smith) typo, need to quote the string to compare $::operatingsystemmajrelease to
- 675434c - (Craig Smith) use versioncmp to compare fedora release (in puppet v4 $::operatingsystemmajrelease is treated strictly as a string)
- e834722 - (Joshua Hoblitt) Merge pull request #13 from ajmaidak/4xparser
operatingsystemmajrelease fact is a string
- 8d595c7 - (Alexander J. Maidak) Cleanup tests for int->string conversion on facts
4x does not magically convert between ints and strings for facts.
- 6c13c64 - (Alexander J. Maidak) operatingsystemmajrelease fact is a string
Fix params.pp for 4x parser. The puppet 4x parser is type sensitive, strings are not magically converted to ints and vice-versa. The operatingsystemmajrelease fact is returned by facter as a string: https://tickets.puppetlabs.com/browse/FACT-962
bump version to v2.1.0
- 82a8239 - (Joshua Hoblitt) bump version to v2.1.0
- 42e0b46 - (Joshua Hoblitt) additional puppet 4 compatibility
- 4670766 - (Joshua Hoblitt) add official support for el7.x
- 178bafa - (Joshua Hoblitt) fix whitespace issues
- 8e273a6 - (Sam Wouters) On RH7 udev is provided by systemd package
- 357b821 - (Joshua Hoblitt) Merge pull request #11 from jhoblitt/feature/v2.0.0
Feature/v2.0.0
- a3a45b6 - (Joshua Hoblitt) bump version to v2.0.0
- 75a7d2f - (Joshua Hoblitt) add Puppet Version Compatibility subsection to README
- 8c37d19 - (Joshua Hoblitt) update README boilerplate
- 141af06 - (Joshua Hoblitt) fix rspec puppet 4 compatibility
- eb534db - (Joshua Hoblitt) remove default nodset symlink
To resolve this PMT error: Puppet::ModuleTool::Errors::ModuleToolError: Found symlinks. Symlinks in modules are not allowed, please remove them.
- 422cb4f - (Joshua Hoblitt) add centos 5.11 nodeset
- db13f26 - (Joshua Hoblitt) add puppet-blacksmith gem
- b07fe5d - (Joshua Hoblitt) add travis_lint rake target
- 7c81d5d - (Joshua Hoblitt) add debian 7.8 nodeset
- 6c88e12 - (Joshua Hoblitt) fix trailing whitespace
- 26635ed - (Joshua Hoblitt) update copyright notice year to 2015
- 239cc2e - (Joshua Hoblitt) add ruby 2.2 to travis matrix
- 1adaa87 - (Joshua Hoblitt) add :validate to default rake target list
- 3df1503 - (Joshua Hoblitt) add metadata-json-lint gem
Needed by rake metadata.json validation target.
- c8317bc - (Joshua Hoblitt) set stdlib requirement to 4.6.0
- 7bf7075 - (Joshua Hoblitt) update travis matrix puppet 3.x minimum version to 3.7
- 27a8ec2 - (Joshua Hoblitt) update rspec-puppet gem version to ~> 2.1.0
For compatibility with puppet 4.0.0
- 41db90e - (Joshua Hoblitt) add junit/ to .gitiginore
Generated by beaker 5
- 8d0f1d8 - (Joshua Hoblitt) add puppet 4.0 to travis matrix
- a818174 - (Joshua Hoblitt) remove puppet 2.7 from travis matrix
4.0.0 has been released; support major release -1
- 308c056 - (Joshua Hoblitt) update beaker nodesets to use current chef/bento boxes
- 46b27e7 - (Joshua Hoblitt) add log/ to .gitignore
Generated by beaker during execution.
- e0c078a - (Joshua Hoblitt) pin rspec on Ruby 1.8.7 (rspec/rspec-core#1864)
- 0e5fc57 - (Joshua Hoblitt) use rspec-puppet 2.0.0 from gems instead of git
- fa14583 - (Joshua Hoblitt) add FACTER_GEM_VERSION to Gemfile
- 1eaabfc - (Joshua Hoblitt) convert Modulefile to metadata.json
- 14f8124 - (Joshua Hoblitt) update spec_helper_acceptance to use #puppet_module_install
Instead of custom scp logic
- 58e70d6 - (Joshua Hoblitt) change nodeset default to centos-65-x64
- ea9e721 - (Joshua Hoblitt) add beaker nodeset for centos 7
- 51eceb9 - (Joshua Hoblitt) add beaker support
- 6976838 - (Joshua Hoblitt) enable travis container based builds
- 394d279 - (Joshua Hoblitt) update rspec-puppet to v2.0.0 git tag
- 957f2a8 - (Joshua Hoblitt) tidy Gemfile formatting
- 92d3172 - (Joshua Hoblitt) fail on linter warnings
- 9127e66 - (Joshua Hoblitt) Merge pull request #9 from jhoblitt/feature/future_parser
add future parser to travis matrix
- cfe424e - (Joshua Hoblitt) add future parser to travis matrix
- 4c3289e - (Joshua Hoblitt) Merge pull request #8 from jhoblitt/feature/v1.2.0
bump version to v1.2.0
- 7a65811 - (Joshua Hoblitt) bump version to v1.2.0
- 7ae9cb7 - (Joshua Hoblitt) Merge pull request #6 from oholiab/master
Case out unused parameters in rules.pp
Allow usage on more recent Fedora systems.
- afd6ec5 - (Paulo E. Castro) Reinstate the operatingsystem check.
- 6cab5a5 - (Paulo E. Castro) Allow usage on more recent Fedora systems.
- a9ac08d - (Matt Carroll) Case out unused parameters in rules.pp
Was breaking because of empty source in puppet 3.6.2
v1.1.0
bump version to v1.1.0
- 292831d - (Joshua Hoblitt) add el5.x to supported platforms list
- 183c640 - (Joshua Hoblitt) bump version to v1.1.0
- 5fc917e - (Joshua Hoblitt) Merge pull request #4 from nosolutions/rhel5
- 5340961 - (Joshua Hoblitt) update travis matrix
- 308052a - (Joshua Hoblitt) update .gitignore
- df9fe39 - (Joshua Hoblitt) update LICNESE copyright notice
- 904a9ce - (Klaus Wagner) Extend module to support RHEL5 as well because the udev utilies have different names. Also implement a protection method udev.conf in case override is not expected. (New param config_file_replace)
- 2111a85 - (Klaus Wagner) Change stdlib uri to http for easier calling behind proxy
v1.0.3
- 64ba826 - (Joshua Hoblitt) bump version to v1.0.3
- 00253ed - (Joshua Hoblitt) Merge pull request #3 from Mayflower/support_ubuntu
add osfamily debian to params
- 92f8e41 - (codec) update spec to fail on OpenSuSE / incl. Debian
- 2a781a0 - (codec) add osfamily debian to params
v1.0.2
-
bf84ffb - (Joshua Hoblitt) bump version to v1.0.2
-
19ca764 - (Joshua Hoblitt) fix resource ordering + implement anchor pattern
-
c8f12f3 - (Joshua Hoblitt) add simple rspec-system tests
-
d9fa183 - (Joshua Hoblitt) fix erb local variable warning
Warning: Variable access via 'udev_log' is deprecated. Use '@udev_log' instead. template[/etc/puppet/modules/udev/templates/udev.conf.erb]:4
v1.0.1
- 5dc0074 - (Joshua Hoblitt) bump version to v1.0.1
- ac1f89d - (Joshua Hoblitt) add compatibility with older puppet 2.7.x
- f8bebb9 - (Joshua Hoblitt) update README boilerplate sections, formatting, and ToC
- e077a61 - (Joshua Hoblitt) add :require to all gems in Gemfile
- 84ba892 - (Joshua Hoblitt) add puppet 2.7.3 (fixed version) to travis matrix
- 22f58cc - (Joshua Hoblitt) change travis puppet 2.7.0 -> 2.7.1
v1.0.0
- 1257c33 - (Joshua Hoblitt) change version to v1.0.0
- ba528ec - (Joshua Hoblitt) change stdlib dep to v3.0.0
The oldest version with ensure_resource()
- 8e01b22 - (Joshua Hoblitt) add a blurb about concat to the README
- 25c837e - (Joshua Hoblitt) missing comma in README example
- 3a469e7 - (Joshua Hoblitt) simplify udev::rule implementation
- a69f1b8 - (Joshua Hoblitt) rename udev::udevadm -> udev::udevadm::trigger
For naming consistency with udev::udevadm::logpriority
- 1ca5e24 - (Joshua Hoblitt) README fixes
- 35266b7 - (Joshua Hoblitt) add puppet 3.3.0 to travis test matrix
- fedd155 - (Joshua Hoblitt) add syslog verbosity management
- db481ed - (Joshua Hoblitt) suppress lint warnings
- 227ab81 - (Joshua Hoblitt) README update
- 252b81c - (Joshua Hoblitt) fix Modulefile to be valid
- 8e79572 - (Joshua Hoblitt) add class udev::rule to manage device rule files
- 112ebab - (Joshua Hoblitt) add class udev::udevadm to manage
udevadm trigger
- b6821fe - (Joshua Hoblitt) add udev package installation support
- 738cea0 - (Joshua Hoblitt) Merge puppet-module_skel
- 4f9f7c8 - (Joshua Hoblitt) first commit
Dependencies
- puppetlabs/stdlib (>= 4.6.0 < 5.0.0)
Copyright (C) 2012-2017 Joshua Hoblitt <josh@hoblitt.com> 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.