aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/media/folders.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/subsystem/media/folders.pp')
-rw-r--r--manifests/subsystem/media/folders.pp32
1 files changed, 32 insertions, 0 deletions
diff --git a/manifests/subsystem/media/folders.pp b/manifests/subsystem/media/folders.pp
new file mode 100644
index 0000000..2fcc637
--- /dev/null
+++ b/manifests/subsystem/media/folders.pp
@@ -0,0 +1,32 @@
+class nodo::subsystem::media::folders(
+ $cache = hiera('nodo::subsystem::media::folders::cache', directory)
+) {
+ # Removable media folder
+ file { [ "/media/usb", "/media/cdrom", "/media/tablet", "/media/phone" ]:
+ ensure => directory,
+ mode => 0755,
+ }
+
+ # Media cache
+ file { "/var/cache/media":
+ ensure => $cache,
+ mode => 0755,
+ }
+
+ # Data folder is a cache
+ file { "/var/data":
+ ensure => "/var/cache/media",
+ }
+
+ # Hostname cache for general use
+ file { "/var/cache/${::hostname}":
+ ensure => directory,
+ mode => 0755,
+ }
+
+ # 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",
+ }
+}