File: option.pp

package info (click to toggle)
puppet-module-camptocamp-kmod 2.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 288 kB
  • sloc: ruby: 244; makefile: 12; sh: 11
file content (35 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# = Define: kmod::alias
#
# == Example
#
#     kmod::option { 'bond0':
#       option => 'bonding',
#     }
#
define kmod::option(
  $option,
  $value,
  $module = $name,
  $ensure = 'present',
  $file   = undef,
) {

  include ::kmod

  $target_file = $file ? {
    undef   => "/etc/modprobe.d/${module}.conf",
    default => $file,
  }


  kmod::setting { "kmod::option ${title}":
    ensure   => $ensure,
    module   => $module,
    category => 'options',
    file     => $target_file,
    option   => $option,
    value    => $value,
  }

}