aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/nas/share.pp2
-rw-r--r--manifests/subsystem/media/folders.pp7
2 files changed, 5 insertions, 4 deletions
diff --git a/manifests/nas/share.pp b/manifests/nas/share.pp
index 6a0d6d3..4472286 100644
--- a/manifests/nas/share.pp
+++ b/manifests/nas/share.pp
@@ -79,7 +79,7 @@ define nodo::nas::share(
}
# Make sure basic media exist, no matter which disk is attached
- $cache = hiera('nodo::subsystem::media::folders::cache', '')
+ $cache = hiera('nodo::subsystem::media::folders::base', '/var/cache/media')
if $cache != '' {
file { [ "${cache}/${name}" ]:
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",
}
}