Module: CemAcpt::PuppetHelpers::Module
- Extended by:
- Logging
- Defined in:
- lib/cem_acpt/puppet_helpers.rb
Overview
Provides helper methods for Puppet Modules.
Constant Summary
Constants included from Logging
Class Method Summary collapse
-
.build_module_package(module_dir, target_dir = nil, should_log: false) ⇒ String
Builds a Puppet module package.
Methods included from Logging
current_log_config, current_log_config, current_log_format, current_log_format, current_log_level, current_log_level, included, logger, logger, new_log_config, new_log_config, new_log_formatter, new_log_formatter, new_log_level, new_log_level, new_logger, new_logger, verbose?, verbose?
Class Method Details
.build_module_package(module_dir, target_dir = nil, should_log: false) ⇒ String
Builds a Puppet module package.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/cem_acpt/puppet_helpers.rb', line 22 def self.build_module_package(module_dir, target_dir = nil, should_log: false) require 'puppet/modulebuilder' require 'fileutils' builder_logger = should_log ? logger : nil builder = Puppet::Modulebuilder::Builder.new(File.(module_dir), target_dir, builder_logger) # Validates module metadata by raising exception if invalid = builder. # Builds the module package logger.info('CemAcpt::PuppetHelpers') { "Building module package for #{builder.release_name}" } builder.build end |