]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/staging/manifests/init.pp
add nanliu/staging to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / staging / manifests / init.pp
diff --git a/3rdparty/modules/staging/manifests/init.pp b/3rdparty/modules/staging/manifests/init.pp
new file mode 100644 (file)
index 0000000..227e1ea
--- /dev/null
@@ -0,0 +1,31 @@
+#   This module manages staging and extraction of files from various sources.
+#
+# #### Actions:
+#
+#   Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name.
+#
+#      /opt/staging/
+#                 |-- puppet
+#                 |   `-- puppet.enterprise.2.0.tar.gz
+#                 `-- tomcat
+#                     `-- tomcat.5.0.tar.gz
+#
+class staging (
+  $path      = $staging::params::path,     #: staging directory filepath
+  $owner     = $staging::params::owner,    #: staging directory owner
+  $group     = $staging::params::group,    #: staging directory group
+  $mode      = $staging::params::mode,     #: staging directory permission
+  $exec_path = $staging::params::exec_path #: executable default path
+) inherits staging::params {
+
+  # Resolve conflict with pe_staging
+  if !defined(File[$path]) {
+    file { $path:
+      ensure => directory,
+      owner  => $owner,
+      group  => $group,
+      mode   => $mode,
+    }
+  }
+
+}