Sha256: 3a2b33637034a2a67caa0e04912677f202175eb79a111193749dbc02dad6a827

Contents?: true

Size: 724 Bytes

Versions: 45

Compression:

Stored size: 724 Bytes

Contents

#
# module_options.rb
#
# This function sets module level default options for other functions.
#
module Puppet::Parser::Functions
  newfunction(:module_options, :doc => <<-EOS
This function sets module level default options for other functions:
EOS
) do |args|
    
    CORL.run do
      raise(Puppet::ParseError, "module_options(): Define a context name and at least one option name/value pair: " +
        "given (#{args.size} for 2)") if args.size < 2

      contexts = args[0]
      options  = args[1]
      force    = ( args[2] ? true : false )
      
      if module_name = parent_module_name
        CORL::Config.set_options(CORL::Util::Data.prefix(module_name, contexts), options, force)
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
corl-0.5.18 lib/puppet/parser/functions/module_options.rb
corl-0.5.17 lib/puppet/parser/functions/module_options.rb
corl-0.5.16 lib/puppet/parser/functions/module_options.rb
corl-0.5.15 lib/puppet/parser/functions/module_options.rb
corl-0.5.14 lib/puppet/parser/functions/module_options.rb
corl-0.5.13 lib/puppet/parser/functions/module_options.rb
corl-0.5.12 lib/puppet/parser/functions/module_options.rb
corl-0.5.11 lib/puppet/parser/functions/module_options.rb
corl-0.5.10 lib/puppet/parser/functions/module_options.rb
corl-0.5.9 lib/puppet/parser/functions/module_options.rb
corl-0.5.8 lib/puppet/parser/functions/module_options.rb
corl-0.5.7 lib/puppet/parser/functions/module_options.rb
corl-0.5.6 lib/puppet/parser/functions/module_options.rb
corl-0.5.5 lib/puppet/parser/functions/module_options.rb
corl-0.5.4 lib/puppet/parser/functions/module_options.rb
corl-0.5.3 lib/puppet/parser/functions/module_options.rb
corl-0.5.2 lib/puppet/parser/functions/module_options.rb
corl-0.5.1 lib/puppet/parser/functions/module_options.rb
corl-0.5.0 lib/puppet/parser/functions/module_options.rb
corl-0.4.29 lib/puppet/parser/functions/module_options.rb