aboutsummaryrefslogtreecommitdiffstats
path: root/lib/puppet/type
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2015-07-20 16:18:52 -0400
committerMartin Mágr <mmagr@redhat.com>2015-09-03 11:35:25 +0200
commite3abcd6b5330959016b43115a8bf1b1cef668d30 (patch)
tree2fa5a31fe28813dcad3426d0dbff3c1e58221210 /lib/puppet/type
parentc529fce3ef2f246909cb821bc2319cc5413960d3 (diff)
Add package_manifest resource.
This patch converts the write_package_names function into a proper resource. Using the write_package_names only works if the function comes last in the puppet manifest. By making the same functionality a custom resource we allow for it to exist anywhere in the manifest and provide the same functionality. The new syntax would be: package_manifest{'/tmp/foo': ensure => present} Co-Authored-By: Martin Mágr <mmagr@redhat.com> Change-Id: If3e03b1983fed47082fac8ce63f975557dbc503c
Diffstat (limited to 'lib/puppet/type')
-rw-r--r--lib/puppet/type/package_manifest.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/type/package_manifest.rb b/lib/puppet/type/package_manifest.rb
new file mode 100644
index 0000000..9ee3270
--- /dev/null
+++ b/lib/puppet/type/package_manifest.rb
@@ -0,0 +1,8 @@
+Puppet::Type.newtype(:package_manifest) do
+
+ ensurable
+ newparam(:path, :namevar => true) do
+ newvalues(/\S+\/\S+/)
+ end
+
+end