diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-09-11 12:33:56 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-09-11 12:33:56 +0000 |
commit | f4872ac98adf09a0888deba5089f5acdea5ec726 (patch) | |
tree | 6a5eeaa83041c2772c1fc0540a63d4bae4df361e /lib/puppet/parser | |
parent | ad974333e0df16cca7aa2f144c84b11dca1d70fc (diff) | |
parent | e3abcd6b5330959016b43115a8bf1b1cef668d30 (diff) |
Merge "Add package_manifest resource."
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/write_package_names.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/puppet/parser/functions/write_package_names.rb b/lib/puppet/parser/functions/write_package_names.rb deleted file mode 100644 index 8f99674..0000000 --- a/lib/puppet/parser/functions/write_package_names.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'fileutils' - -module Puppet::Parser::Functions - newfunction(:write_package_names, :doc => "Write package names which are managed via this puppet run to a file.") do |arg| - if arg[0].class == String - begin - output_file = arg[0] - packages = catalog.resources.collect { |r| r.title if r.type == 'Package' }.compact - FileUtils.mkdir_p(File.dirname(output_file)) - File.open(output_file, 'w') do |f| - packages.each do |pkg_name| - f.write(pkg_name + "\n") - end - end - rescue JSON::ParserError - raise Puppet::ParseError, "Syntax error: #{arg[0]} is invalid" - end - else - raise Puppet::ParseError, "Syntax error: #{arg[0]} is not a String" - end - end -end |