diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-31 15:30:44 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-31 15:30:44 -0200 |
commit | c0c38faca2843d5f7b0c9b11a3a2abdfd2bd2d45 (patch) | |
tree | f032089236b83b0e1147b69611f6b1ffdfa2b40c /manifests | |
parent | fedb88509e093c055d60938a8331fba497797a2a (diff) | |
download | puppet-nodo-c0c38faca2843d5f7b0c9b11a3a2abdfd2bd2d45.tar.gz puppet-nodo-c0c38faca2843d5f7b0c9b11a3a2abdfd2bd2d45.tar.bz2 |
PAM and initramfs config for wheezy
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/subsystems/initramfs.pp | 27 | ||||
-rw-r--r-- | manifests/subsystems/pam.pp | 37 |
2 files changed, 45 insertions, 19 deletions
diff --git a/manifests/subsystems/initramfs.pp b/manifests/subsystems/initramfs.pp index 0a8d49b..58e5c71 100644 --- a/manifests/subsystems/initramfs.pp +++ b/manifests/subsystems/initramfs.pp @@ -1,4 +1,6 @@ -class initramfs { +class initramfs( + $keymap = hiera('nodo::initramfs::keymap', 'absent') +) { # initramfs config file { "/etc/kernel-img.conf": owner => "root", @@ -17,9 +19,30 @@ class initramfs { 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, + } + + # keyboard + # see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619711 + file { "/etc/default/keyboard": + ensure => present, + 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"] ], + subscribe => [ File["/etc/initramfs-tools/modules"], + File["/etc/modprobe.d/blacklist"], + File["/etc/initramfs-tools/conf.d/keymap.conf"], + File["/etc/default/keyboard"] ], refreshonly => true, alias => 'update-initramfs', } diff --git a/manifests/subsystems/pam.pp b/manifests/subsystems/pam.pp index 62b9e22..dc326a1 100644 --- a/manifests/subsystems/pam.pp +++ b/manifests/subsystems/pam.pp @@ -2,24 +2,27 @@ class pam( $enable = hiera('nodo::pam::enable', false) ) { if $enable != false { - # pam - login - file { "/etc/pam.d/login": - source => [ "puppet:///modules/nodo/etc/pam.d/login.${::lsbdistcodename}", - "puppet:///modules/nodo/etc/pam.d/login", - ], - owner => "root", - group => "root", - mode => 0644, - ensure => present, - } + # Squeeze only + if $::lsbdistcodename == 'squeeze' { + # pam - login + file { "/etc/pam.d/login": + source => [ "puppet:///modules/nodo/etc/pam.d/login.${::lsbdistcodename}", + "puppet:///modules/nodo/etc/pam.d/login", + ], + owner => "root", + group => "root", + mode => 0644, + ensure => present, + } - # pam - gdm - file { "/etc/pam.d/gdm": - source => "puppet:///modules/nodo/etc/pam.d/gdm", - owner => "root", - group => "root", - mode => 0644, - ensure => present, + # pam - gdm + file { "/etc/pam.d/gdm": + source => "puppet:///modules/nodo/etc/pam.d/gdm", + owner => "root", + group => "root", + mode => 0644, + ensure => present, + } } # pam - mountpoints |