aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/media
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-12 17:09:03 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-12 17:09:03 -0300
commitfe1c86b8f938283e9dd8196a8b11a9648f4b49e6 (patch)
treec2d999eca03862a3e4af57e0885397adf6bbc6ec /manifests/subsystem/media
parentec5c750d12bdc7948bb3c04f0c72817718a0bf47 (diff)
downloadpuppet-nodo-fe1c86b8f938283e9dd8196a8b11a9648f4b49e6.tar.gz
puppet-nodo-fe1c86b8f938283e9dd8196a8b11a9648f4b49e6.tar.bz2
Major refactor
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',
+ }
+}