Sha256: cd76c14d93c0197ea3024d8d40c2aa7801ee558f38c6f38970b865b239fd1a65

Contents?: true

Size: 561 Bytes

Versions: 39

Compression:

Stored size: 561 Bytes

Contents

# Orders modules names according to kafo.yaml
#
# if order was specified we take all modules in this order, if there are
# other modules that were not ordered, we put them at the end in non-specified
# order
module Puppet::Parser::Functions
  newfunction(:kafo_ordered, :type => :rvalue) do |args|
    order = YAML.load_file(lookupvar('kafo_config_file'))[:order]
    if order.nil?
      args[0]
    else
      result = []
      base = args[0].clone
      order.each do |name|
        result<< base.delete(name)
      end
      result + base
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
kafo-0.5.4 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.5.3 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.17 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.5.2 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.5.1 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.5.0 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.4.0 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.16 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.15 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.14 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.13 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.12 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.11 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.10 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.9 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.8 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.7 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.6 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.5 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
kafo-0.3.4 modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb