diff options
-rw-r--r-- | manifests/desktop.pp | 16 | ||||
-rw-r--r-- | manifests/laptop.pp | 20 | ||||
-rw-r--r-- | manifests/subsystems/crypttab.pp | 19 | ||||
-rw-r--r-- | manifests/subsystems/fstab.pp | 19 |
4 files changed, 33 insertions, 41 deletions
diff --git a/manifests/desktop.pp b/manifests/desktop.pp index 6b3a724..3cbe001 100644 --- a/manifests/desktop.pp +++ b/manifests/desktop.pp @@ -1,24 +1,16 @@ class nodo::desktop inherits nodo::personal { include utils::desktop - # fstab - if $fstab != false { - class { 'fstab': - type => 'desktop', - } + class { 'fstab': + type => 'desktop', } - # crypttab - if $crypttab != false { - class { 'crypttab': - type => 'desktop', - } + class { 'crypttab': + type => 'desktop', } } class nodo::desktop::minimal { - $fstab = false - $crypttab = false $pam = false # Backups should happen when the box is likely to be online diff --git a/manifests/laptop.pp b/manifests/laptop.pp index 93376d6..f184801 100644 --- a/manifests/laptop.pp +++ b/manifests/laptop.pp @@ -7,21 +7,15 @@ class nodo::laptop inherits nodo::personal { include firewall::ppp include dhclient - # fstab - if $fstab != false { - class { 'fstab': - type => 'laptop', - } + class { 'fstab': + type => 'laptop', } - # crypttab - if $crypttab != false { - class { 'crypttab': - type => $hibernate ? { - false => "laptop", - default => "laptop.hibernate", - }, - } + class { 'crypttab': + type => $hibernate ? { + false => "laptop", + default => "laptop.hibernate", + }, } # hibernation diff --git a/manifests/subsystems/crypttab.pp b/manifests/subsystems/crypttab.pp index 6447005..0a9a4d1 100644 --- a/manifests/subsystems/crypttab.pp +++ b/manifests/subsystems/crypttab.pp @@ -1,12 +1,15 @@ class crypttab( - $type + $type, + $manage = hiera('nodo::crypttab::manage', false) ) { - file { "/etc/crypttab": - source => "puppet:///modules/nodo/etc/crypttab/${type}", - owner => "root", - group => "root", - mode => 0644, - ensure => present, - notify => Exec['update-initramfs'], + if $manage == true { + file { "/etc/crypttab": + source => "puppet:///modules/nodo/etc/crypttab/${type}", + owner => "root", + group => "root", + mode => 0644, + ensure => present, + notify => Exec['update-initramfs'], + } } } diff --git a/manifests/subsystems/fstab.pp b/manifests/subsystems/fstab.pp index 40c8c30..c6f2ecd 100644 --- a/manifests/subsystems/fstab.pp +++ b/manifests/subsystems/fstab.pp @@ -1,12 +1,15 @@ class fstab( - $type + $type, + $manage = hiera('nodo::fstab::manage', false) ) { - file { "/etc/fstab": - source => "puppet:///modules/nodo/etc/fstab/${type}", - owner => "root", - group => "root", - mode => 0644, - ensure => present, - notify => Exec['update-initramfs'], + if $manage == true { + file { "/etc/fstab": + source => "puppet:///modules/nodo/etc/fstab/${type}", + owner => "root", + group => "root", + mode => 0644, + ensure => present, + notify => Exec['update-initramfs'], + } } } |