aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/media
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/subsystem/media')
-rw-r--r--manifests/subsystem/media/folders.pp32
-rw-r--r--manifests/subsystem/media/groups.pp5
2 files changed, 37 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",
+ }
+}
diff --git a/manifests/subsystem/media/groups.pp b/manifests/subsystem/media/groups.pp
new file mode 100644
index 0000000..098ae67
--- /dev/null
+++ b/manifests/subsystem/media/groups.pp
@@ -0,0 +1,5 @@
+class nodo::subsystem::media::groups {
+ group { 'incoming':
+ ensure => 'present',
+ }
+}