aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-03-29 20:41:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-03-29 20:41:07 -0300
commit1100bc841430aa6b4da02d22543802b0d828d82d (patch)
tree85f21a85369f4fbdb7c36f156dc60e8a9da3f6f0
parent20969de4049a02a9a05c26985ba8cdfd4e78e20a (diff)
downloadpuppet-nodo-1100bc841430aa6b4da02d22543802b0d828d82d.tar.gz
puppet-nodo-1100bc841430aa6b4da02d22543802b0d828d82d.tar.bz2
Moving some defines from media::folders back to nodo::personal
-rw-r--r--manifests/personal.pp12
-rw-r--r--manifests/subsystems/media.pp18
2 files changed, 16 insertions, 14 deletions
diff --git a/manifests/personal.pp b/manifests/personal.pp
index 7ab1662..f647778 100644
--- a/manifests/personal.pp
+++ b/manifests/personal.pp
@@ -23,6 +23,18 @@ class nodo::personal {
# Media folders
class { 'media::folders': }
+ # Mountpoint for encrypted home folders
+ file { [ '/mnt/crypt/', '/mnt/crypt/home' ]:
+ ensure => directory,
+ }
+
+ # Misc user data
+ file { [ "/var/data/code", "/var/data/crypt", "/var/data/crypt/home", "/var/data/load" ]:
+ ensure => directory,
+ mode => 0755,
+ require => File['/var/cache/media'],
+ }
+
# Development
file { [ "/var/cache/vagrant", "/var/cache/virtualbox" ]:
ensure => directory,
diff --git a/manifests/subsystems/media.pp b/manifests/subsystems/media.pp
index 4b78f07..0e808c9 100644
--- a/manifests/subsystems/media.pp
+++ b/manifests/subsystems/media.pp
@@ -1,18 +1,15 @@
-class media::folders {
+class media::folders(
+ $ensure_cache = hiera('nodo::media::folders', directory)
+) {
# Removable media folder
file { [ "/media/usb", "/media/cdrom", "/media/tablet", "/media/phone" ]:
ensure => directory,
mode => 0755,
}
- # Mountpoint for encrypted home folders
- file { [ '/mnt/crypt/', '/mnt/crypt/home' ]:
- ensure => directory,
- }
-
# Media cache
file { "/var/cache/media":
- ensure => directory,
+ ensure => $ensure_cache,
mode => 0755,
}
@@ -21,13 +18,6 @@ class media::folders {
ensure => "/var/cache/media",
}
- # Misc user data
- file { [ "/var/data/code", "/var/data/crypt", "/var/data/crypt/home", "/var/data/load" ]:
- ensure => directory,
- mode => 0755,
- require => File['/var/cache/media'],
- }
-
# Hostname cache for general use
file { "/var/cache/${::hostname}":
ensure => directory,