From 1c2fb29bea38ccf12adf4fe8fd93fef44245eda0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 24 Jan 2013 15:49:41 -0200 Subject: Making fstab and crypttab management optional --- manifests/subsystems/crypttab.pp | 19 +++++++++++-------- manifests/subsystems/fstab.pp | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) (limited to 'manifests/subsystems') 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'], + } } } -- cgit v1.2.3