aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-22 13:25:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-22 13:25:37 -0300
commit91565006cc4511310f8789a9f9abbe4234054ec0 (patch)
tree1e9fca95e950d502d3dbcb722ac14dcff08a27f2
parentc1b813a354811d039a8f9f2a164cac666b2133af (diff)
downloadpuppet-nodo-91565006cc4511310f8789a9f9abbe4234054ec0.tar.gz
puppet-nodo-91565006cc4511310f8789a9f9abbe4234054ec0.tar.bz2
Subscribing fs config files to update-initramfs on laptop
-rw-r--r--manifests/laptop.pp33
-rw-r--r--manifests/subsystems/initramfs.pp1
2 files changed, 19 insertions, 15 deletions
diff --git a/manifests/laptop.pp b/manifests/laptop.pp
index d166a15..ba5235d 100644
--- a/manifests/laptop.pp
+++ b/manifests/laptop.pp
@@ -9,34 +9,37 @@ class nodo::laptop inherits nodo::personal {
# fstab
if $fstab != false {
file { "/etc/fstab":
- source => "puppet://$server/modules/nodo/etc/fstab/laptop",
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
+ source => "puppet://$server/modules/nodo/etc/fstab/laptop",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ subscribe => Exec['update-initramfs],
}
}
# crypttab
if $crypttab != false {
file { "/etc/crypttab":
- source => $hibernate ? {
+ source => $hibernate ? {
false => "puppet://$server/modules/nodo/etc/crypttab/laptop",
default => "puppet://$server/modules/nodo/etc/crypttab/laptop.hibernate",
},
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ subscribe => Exec['update-initramfs],
}
# hibernation
file { "/etc/initramfs-tools/conf.d/resume":
- owner => "root",
- group => "root",
- mode => 0644,
- content => "RESUME=/dev/mapper/cswap",
- ensure => $hibernate ? {
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ content => "RESUME=/dev/mapper/cswap",
+ subscribe => Exec['update-initramfs],
+ ensure => $hibernate ? {
false => absent,
default => present,
},
diff --git a/manifests/subsystems/initramfs.pp b/manifests/subsystems/initramfs.pp
index 3b37f65..27029c3 100644
--- a/manifests/subsystems/initramfs.pp
+++ b/manifests/subsystems/initramfs.pp
@@ -21,5 +21,6 @@ class initramfs {
exec { "update-initramfs -v -u":
subscribe => [ File["/etc/initramfs-tools/modules"], File["/etc/modprobe.d/blacklist"] ],
refreshonly => true,
+ alias => 'update-initramfs',
}
}