aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/media
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/subsystem/media')
-rw-r--r--manifests/subsystem/media/folders.pp7
1 files changed, 4 insertions, 3 deletions
diff --git a/manifests/subsystem/media/folders.pp b/manifests/subsystem/media/folders.pp
index 3f812e7..11d2f26 100644
--- a/manifests/subsystem/media/folders.pp
+++ b/manifests/subsystem/media/folders.pp
@@ -1,4 +1,5 @@
class nodo::subsystem::media::folders(
+ $base = hiera('nodo::subsystem::media::folders::base', '/var/cache/media'),
$cache = hiera('nodo::subsystem::media::folders::cache', directory),
$owner = hiera('nodo::subsystem::media::folders::owner', false),
$group = hiera('nodo::subsystem::media::folders::group', false)
@@ -10,7 +11,7 @@ class nodo::subsystem::media::folders(
}
# Media cache
- file { "/var/cache/media":
+ file { "$base":
ensure => $cache,
mode => 0755,
owner => $owner ? {
@@ -25,7 +26,7 @@ class nodo::subsystem::media::folders(
# Data folder is a cache
file { "/var/data":
- ensure => "/var/cache/media",
+ ensure => "$base",
}
# Hostname cache for general use
@@ -37,6 +38,6 @@ class nodo::subsystem::media::folders(
# Link to the media cache, useful to have unique remotes
# for git-annex in removable media
file { "/var/cache/${::hostname}/media":
- ensure => "/var/cache/media",
+ ensure => "$base",
}
}