aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/media/folders.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-08-23 16:42:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-08-23 16:42:58 -0300
commit5d0ae44bc45d00e351204bbd7f2a95dfaec1e0ea (patch)
tree88e07d0bc73bf7a6a48854fa3153d9182b9688c8 /manifests/subsystem/media/folders.pp
parent122d4b35bb7546c2b77a8fc4ece3e27f4c525c84 (diff)
downloadpuppet-nodo-5d0ae44bc45d00e351204bbd7f2a95dfaec1e0ea.tar.gz
puppet-nodo-5d0ae44bc45d00e351204bbd7f2a95dfaec1e0ea.tar.bz2
Introducing 'nodo::subsystem::media::folders::base'
Diffstat (limited to 'manifests/subsystem/media/folders.pp')
-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",
}
}