diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-10-14 01:57:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-10-14 01:57:26 -0300 |
commit | 095a1e4d61ac2bab9b6cc44ff3039009f734292a (patch) | |
tree | a43f0a6b34e746d17b0818aea6dc8058d68bfa0a | |
parent | ed11b672c44f85700c940bc0aa690d0d4f324918 (diff) | |
download | puppet-nodo-095a1e4d61ac2bab9b6cc44ff3039009f734292a.tar.gz puppet-nodo-095a1e4d61ac2bab9b6cc44ff3039009f734292a.tar.bz2 |
Make /var/cache/media link to /var/cache/$hostname and not the other way
-rw-r--r-- | manifests/subsystem/media/folders.pp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/manifests/subsystem/media/folders.pp b/manifests/subsystem/media/folders.pp index 243c245..4495bae 100644 --- a/manifests/subsystem/media/folders.pp +++ b/manifests/subsystem/media/folders.pp @@ -4,14 +4,20 @@ class nodo::subsystem::media::folders( $owner = hiera('nodo::subsystem::media::folders::owner', false), $group = hiera('nodo::subsystem::media::folders::group', false) ) { - # Removable media folder + # Removable media folders file { [ "/media/usb", "/media/cdrom", "/media/tablet", "/media/phone" ]: ensure => directory, mode => 0755, } - # Media cache - file { "$base": + # Local cache for general use + file { "/var/cache/${::hostname}": + ensure => directory, + mode => 0755, + } + + # Local media cache + file { "/var/cache/${::hostname}/media": ensure => $cache, mode => 0755, owner => $owner ? { @@ -24,6 +30,12 @@ class nodo::subsystem::media::folders( }, } + # Link to the media cache, useful to have unique remotes + # for git-annex in removable media + file { "$base": + ensure => "/var/cache/${::hostname}/media", + } + # Code and load folders file { [ "${base}/code", "${base}/load" ]: ensure => directory, @@ -43,16 +55,4 @@ class nodo::subsystem::media::folders( file { "/var/data": ensure => "$base", } - - # 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 => "$base", - } } |