aboutsummaryrefslogtreecommitdiff
path: root/manifests/laptop.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-22 12:56:24 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-22 12:56:24 -0200
commit616d2575015a57407cd0a930b8cd16b0b29aecb6 (patch)
treec19024bf97fd737511a22acd0029fc48cff905c1 /manifests/laptop.pp
parentfb6d9071efc4ebc47d34ed0ab263e55d5ed143a6 (diff)
downloadpuppet-nodo-616d2575015a57407cd0a930b8cd16b0b29aecb6.tar.gz
puppet-nodo-616d2575015a57407cd0a930b8cd16b0b29aecb6.tar.bz2
Adding fstab and crypttab classes
Diffstat (limited to 'manifests/laptop.pp')
-rw-r--r--manifests/laptop.pp39
1 files changed, 15 insertions, 24 deletions
diff --git a/manifests/laptop.pp b/manifests/laptop.pp
index 382279e..43303a3 100644
--- a/manifests/laptop.pp
+++ b/manifests/laptop.pp
@@ -9,38 +9,29 @@ 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,
- notify => Exec['update-initramfs'],
+ class { 'fstab':
+ type => 'laptop',
}
}
# crypttab
if $crypttab != false {
- file { "/etc/crypttab":
- source => $hibernate ? {
- false => "puppet://$server/modules/nodo/etc/crypttab/laptop",
- default => "puppet://$server/modules/nodo/etc/crypttab/laptop.hibernate",
+ class { 'crypttab':
+ type => $hibernate ? {
+ false => "laptop",
+ default => "laptop.hibernate",
},
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
- notify => Exec['update-initramfs'],
}
+ }
- # hibernation
- file { "/etc/initramfs-tools/conf.d/resume":
- owner => "root",
- group => "root",
- mode => 0644,
- content => "RESUME=/dev/mapper/cswap\n",
- notify => Exec['update-initramfs'],
- ensure => $hibernate ? {
+ # hibernation
+ file { "/etc/initramfs-tools/conf.d/resume":
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ content => "RESUME=/dev/mapper/cswap\n",
+ notify => Exec['update-initramfs'],
+ ensure => $hibernate ? {
false => absent,
default => present,
},