aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-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,