/
task.json
116 lines (116 loc) · 3.73 KB
/
task.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Puppet Task Metadata",
"description": "The metadata format for Puppet Tasks",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A longer description(one paragraph) of how to use the task"
},
"puppet_task_version": {
"type": "integer",
"description": "The version of this spec used",
"default": 1
},
"supports_noop": {
"type": "boolean",
"default": false,
"description": "This task respects the '_noop' metaparam. If this false or absent the task runner will refuse to run this task if noop is specified."
},
"remote": {
"type": "boolean",
"default": false,
"description": "This task is capable of operating on a remote target using connection information in the '_target' metaparam."
},
"input_method": {
"type": "string",
"enum": ["stdin", "environment", "both", "powershell"],
"description": "What input method should be used to pass params to the task"
},
"parameters": {
"$ref": "#/definitions/paramsObject",
"description": "An object mapping valid parameter names to corresponding json-schemas"
},
"implementations": {
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Name of task executable file"
},
"requirements": {
"type": "array",
"additionalItems": {
"type": "string"
},
"description": "Features required on target to execute task"
},
"files": {
"type": "array",
"additionalItems": {
"type": "string"
},
"description": "File resources required by task"
}
}
},
"description": "Rules for selecting implementation resources based on features available on target"
},
"files": {
"type": "array",
"items": {
"type": "string"
},
"description": "Path to file resources saved in valid module directory to be provided to task"
},
"private": {
"type": "boolean",
"description": "Should this task appear by default in UI lists of tasks"
},
"extensions": {
"type": "object",
"description": "Task Runner specific metadata extensions",
"items": {
"type": "object"
}
}
},
"definitions": {
"parameterName": {
"description": "Valid names for parameter keys",
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"paramsObject": {
"type": "object",
"description": "An object with restricted keys and enumData support",
"propertyNames": {"$ref": "#/definitions/parameterName"},
"additionalProperties": {
"type": "object",
"description": "Extend Normal JSON schema to require an object and describe 'enumData' to map enum values to descriptions",
"properties": {
"description": {
"description": "A description of the parameter",
"type": "string"
},
"type": {
"description": "A puppet type string that describes a data type that will match the parameter value",
"type": "string"
},
"sensitive": {
"description": "Whether the task runner should treat the parameter value as sensitive",
"type": "boolean",
"default": false
},
"default": {
"description": "The default value to pass to the task implementation if the parameter isn't provided"
}
}
}
}
}
}