udev
syslog verbosity] (#managing-udev-syslog-verbosity)udev
rulesudev
device rules reloadManages the udev package and device rules
This module installs and manages the
udev
package.
This class does not need to be manually included in the manifest when using the
udev::rule
defined type.
include udev
udev
syslog verbosityControls the value of udev_log
in udev.conf
and change the runtime syslog
verbosity of the daemon.
class { 'udev': udev_log => 'debug' }
udev
rulesNote 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,
}
Rules may also be created as a parameter off of the udev
class
class { 'udev':
rules => { '99-foo.rules':
ensure => present,
content => template('mymodule/foo.rules.erb'), }
}
udev
device rules reloadfile { '/etc/etc/udev/rules.d/99-myfrobnicator.rules':
...
notify => Class['udev::udevadm::trigger'],
}
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).
Versions | Puppet 2.7 | Puppet 3.x | Puppet 4.x | Puppet 5.x |
---|---|---|---|---|
1.x | yes | yes | no | no |
2.x | no | yes | yes | yes |
This module is versioned according to the Semantic Versioning 2.0.0 specification.
Please log tickets and issues at github
feature/mousetrap
bundle exec rake lint
Rspec-puppet
unit tests are not broken and coverage is added for newbundle exec rake spec
beaker
acceptance tests should be run and potentiallybundle exec rake beaker
master
branch