diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-03-29 20:36:31 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-03-29 20:36:31 -0300 |
commit | 20969de4049a02a9a05c26985ba8cdfd4e78e20a (patch) | |
tree | 1034c6fad7fcf16534711560ac6d6f23f7a1b618 /manifests/subsystems | |
parent | 6a1332a1b08cddeb791d1210f119ac8d26dd593d (diff) | |
download | puppet-nodo-20969de4049a02a9a05c26985ba8cdfd4e78e20a.tar.gz puppet-nodo-20969de4049a02a9a05c26985ba8cdfd4e78e20a.tar.bz2 |
Adding media::folders class
Diffstat (limited to 'manifests/subsystems')
-rw-r--r-- | manifests/subsystems/media.pp | 42 |
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", + } +} |