aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/initramfs.pp
blob: 22e642c17a3a971c3f77f5d1d45a589d8fefd657 (plain)
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
36
37
38
39
class nodo::subsystem::initramfs(
  $keymap = hiera('nodo::initramfs::keymap', 'absent')
) {
  # Image config
  file { "/etc/kernel-img.conf":
    owner   => "root",
    group   => "root",
    mode    => 0644,
    ensure  => present,
    content => "do_initrd = Yes\n",
  }

  # Modules config
  file { "/etc/initramfs-tools/modules":
    owner   => "root",
    group   => "root",
    mode    => 0644,
    ensure  => present,
    source  => "puppet:///modules/nodo/etc/initramfs-tools/modules",
  }

  # Keymap
  file { "/etc/initramfs-tools/conf.d/keymap.conf":
    ensure  => $keymap,
    content => "KEYMAP=Y\n",
    owner   => "root",
    group   => "root",
    mode    => 0644,
  }

  # Update initramfs when needed
  exec { "update-initramfs -v -t -u":
    subscribe   => [ File["/etc/initramfs-tools/modules"],
                     File["/etc/modprobe.d/blacklist.conf"],
                     File["/etc/initramfs-tools/conf.d/keymap.conf"] ],
    refreshonly => true,
    alias       => 'update-initramfs',
  }
}