diff options
author | Micah <micah@leap.se> | 2016-07-12 16:45:36 -0400 |
---|---|---|
committer | Micah <micah@leap.se> | 2016-07-12 16:45:36 -0400 |
commit | 6083b23278927189de58c11bbb5bc7d93ccced24 (patch) | |
tree | ce771fbca93d6f798a6962b3b2a187078c978554 /puppet/modules/common/manifests/module_dir.pp | |
parent | 1f231f09a9b6911b2ca57ac82235c6028922d54f (diff) |
git subrepo clone https://leap.se/git/puppet_common puppet/modules/common
subrepo:
subdir: "puppet/modules/common"
merged: "ae14962"
upstream:
origin: "https://leap.se/git/puppet_common"
branch: "master"
commit: "ae14962"
git-subrepo:
version: "0.3.0"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "1e79595"
Change-Id: I82a15d5ab5c4e8f689f73de4e5ae97557f39b6fb
Diffstat (limited to 'puppet/modules/common/manifests/module_dir.pp')
-rw-r--r-- | puppet/modules/common/manifests/module_dir.pp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/puppet/modules/common/manifests/module_dir.pp b/puppet/modules/common/manifests/module_dir.pp new file mode 100644 index 00000000..2420da94 --- /dev/null +++ b/puppet/modules/common/manifests/module_dir.pp @@ -0,0 +1,34 @@ +# common/manifests/modules_dir.pp -- create a default directory +# for storing module specific information +# +# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at> +# See LICENSE for the full license granted to you. + +# A module_dir is a storage place for all the stuff a module might want to +# store. According to the FHS, this should go to /var/lib. Since this is a part +# of puppet, the full path is /var/lib/puppet/modules/${name}. Every module +# should # prefix its module_dirs with its name. +# +# Usage: +# include common::moduledir +# module_dir { ["common", "common/dir1", "common/dir2" ]: } +# +# You may refer to a file in module_dir by using : +# file { "${common::moduledir::module_dir_path}/somedir/somefile": } +define common::module_dir( + $owner = root, + $group = 0, + $mode = 0644 +) { + include common::moduledir + file { + "${common::moduledir::module_dir_path}/${name}": + ensure => directory, + recurse => true, + purge => true, + force => true, + owner => $owner, + group => $group, + mode => $mode; + } +} |