Puppet Function: choria::tasks::metadata
- Defined in:
- lib/puppet/functions/choria/tasks/metadata.rb
- Function type:
- Ruby 4.x API
Overview
Downloads metadata for a Puppet Task
This helper downloads the specification of a task from the Puppet Server, for this to work you should have followed the configuration guide at [choria.io](choria.io) to ensure the required Puppet Server configuration were complete
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/puppet/functions/choria/tasks/metadata.rb', line 6 Puppet::Functions.create_function(:"choria::tasks::metadata") do dispatch :fetch do param "String", :task end def init require_relative "../../../_load_choria" end def choria @_choria ||= begin init MCollective::Util::Choria.new end end def tasks_support @__tasks ||= choria.tasks_support end def fetch(task) tasks_support.(task, "production") end end |