aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/media.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/subsystems/media.pp')
-rw-r--r--manifests/subsystems/media.pp42
1 files changed, 42 insertions, 0 deletions
diff --git a/manifests/subsystems/media.pp b/manifests/subsystems/media.pp
new file mode 100644
index 0000000..4b78f07
--- /dev/null
+++ b/manifests/subsystems/media.pp
@@ -0,0 +1,42 @@
+class media::folders {
+ # Removable media folder
+ file { [ "/media/usb", "/media/cdrom", "/media/tablet", "/media/phone" ]:
+ ensure => directory,
+ mode => 0755,
+ }
+
+ # Mountpoint for encrypted home folders
+ file { [ '/mnt/crypt/', '/mnt/crypt/home' ]:
+ ensure => directory,
+ }
+
+ # Media cache
+ file { "/var/cache/media":
+ ensure => directory,
+ mode => 0755,
+ }
+
+ # Data folder is a cache
+ file { "/var/data":
+ ensure => "/var/cache/media",
+ }
+
+ # Misc user data
+ file { [ "/var/data/code", "/var/data/crypt", "/var/data/crypt/home", "/var/data/load" ]:
+ ensure => directory,
+ mode => 0755,
+ require => File['/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",
+ }
+}