36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/puppet/pops/pcore.rb', line 36
def self.init_env(loader)
if Puppet[:tasks]
add_object_type('Task', <<-PUPPET, loader)
{
attributes => {
# Fully qualified name of the task
name => { type => Pattern[/\\A[a-z][a-z0-9_]*(?:::[a-z][a-z0-9_]*)*\\z/] },
# List of file references referenced by metadata and their paths on disk.
# If there are no implementations listed in metadata, the first file is always
# the task executable.
files => { type => Array[Struct[name => String, path => String]] },
# Task metadata
metadata => { type => Hash[String, Any] },
# Map parameter names to their parsed data type
parameters => { type => Optional[Hash[Pattern[/\\A[a-z][a-z0-9_]*\\z/], Type]], value => undef },
}
}
PUPPET
end
end
|