choria-mcorpc-support 2.21.1 → 2.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mcollective.rb +1 -2
  3. data/lib/mcollective/agent/bolt_tasks.ddl +253 -0
  4. data/lib/mcollective/agent/bolt_tasks.json +365 -0
  5. data/lib/mcollective/agent/bolt_tasks.rb +178 -0
  6. data/lib/mcollective/agent/choria_util.ddl +152 -0
  7. data/lib/mcollective/agent/choria_util.json +244 -0
  8. data/lib/mcollective/agent/rpcutil.ddl +8 -4
  9. data/lib/mcollective/agent/rpcutil.json +333 -0
  10. data/lib/mcollective/agent/scout.ddl +169 -0
  11. data/lib/mcollective/agent/scout.json +224 -0
  12. data/lib/mcollective/agents.rb +7 -6
  13. data/lib/mcollective/aggregate.rb +4 -4
  14. data/lib/mcollective/aggregate/average.rb +2 -2
  15. data/lib/mcollective/aggregate/base.rb +2 -2
  16. data/lib/mcollective/aggregate/result.rb +3 -3
  17. data/lib/mcollective/aggregate/result/collection_result.rb +2 -2
  18. data/lib/mcollective/aggregate/result/numeric_result.rb +2 -2
  19. data/lib/mcollective/aggregate/sum.rb +2 -2
  20. data/lib/mcollective/aggregate/summary.rb +3 -4
  21. data/lib/mcollective/application.rb +57 -21
  22. data/lib/mcollective/application/choria.rb +189 -0
  23. data/lib/mcollective/application/completion.rb +6 -6
  24. data/lib/mcollective/application/facts.rb +11 -11
  25. data/lib/mcollective/application/federation.rb +237 -0
  26. data/lib/mcollective/application/find.rb +4 -4
  27. data/lib/mcollective/application/help.rb +3 -3
  28. data/lib/mcollective/application/inventory.rb +3 -341
  29. data/lib/mcollective/application/ping.rb +5 -51
  30. data/lib/mcollective/application/playbook.rb +207 -0
  31. data/lib/mcollective/application/plugin.rb +106 -106
  32. data/lib/mcollective/application/rpc.rb +3 -108
  33. data/lib/mcollective/application/tasks.rb +425 -0
  34. data/lib/mcollective/applications.rb +11 -10
  35. data/lib/mcollective/audit/choria.rb +33 -0
  36. data/lib/mcollective/cache.rb +2 -4
  37. data/lib/mcollective/client.rb +11 -10
  38. data/lib/mcollective/config.rb +21 -34
  39. data/lib/mcollective/connector/base.rb +2 -1
  40. data/lib/mcollective/connector/nats.ddl +9 -0
  41. data/lib/mcollective/connector/nats.rb +450 -0
  42. data/lib/mcollective/data.rb +8 -3
  43. data/lib/mcollective/data/agent_data.rb +1 -1
  44. data/lib/mcollective/data/base.rb +6 -5
  45. data/lib/mcollective/data/bolt_task_data.ddl +90 -0
  46. data/lib/mcollective/data/bolt_task_data.rb +32 -0
  47. data/lib/mcollective/data/collective_data.rb +1 -1
  48. data/lib/mcollective/data/fact_data.rb +6 -6
  49. data/lib/mcollective/data/fstat_data.rb +2 -4
  50. data/lib/mcollective/data/result.rb +7 -2
  51. data/lib/mcollective/ddl/agentddl.rb +5 -17
  52. data/lib/mcollective/ddl/base.rb +10 -13
  53. data/lib/mcollective/discovery.rb +24 -39
  54. data/lib/mcollective/discovery/choria.ddl +11 -0
  55. data/lib/mcollective/discovery/choria.rb +223 -0
  56. data/lib/mcollective/discovery/flatfile.rb +7 -8
  57. data/lib/mcollective/discovery/mc.rb +2 -2
  58. data/lib/mcollective/discovery/stdin.rb +17 -18
  59. data/lib/mcollective/exceptions.rb +13 -0
  60. data/lib/mcollective/facts/base.rb +9 -9
  61. data/lib/mcollective/facts/yaml_facts.rb +12 -12
  62. data/lib/mcollective/generators.rb +3 -3
  63. data/lib/mcollective/generators/agent_generator.rb +3 -4
  64. data/lib/mcollective/generators/base.rb +14 -15
  65. data/lib/mcollective/generators/data_generator.rb +5 -6
  66. data/lib/mcollective/log.rb +2 -2
  67. data/lib/mcollective/logger/base.rb +3 -2
  68. data/lib/mcollective/logger/console_logger.rb +10 -10
  69. data/lib/mcollective/logger/file_logger.rb +7 -7
  70. data/lib/mcollective/logger/syslog_logger.rb +11 -15
  71. data/lib/mcollective/message.rb +8 -39
  72. data/lib/mcollective/monkey_patches.rb +2 -4
  73. data/lib/mcollective/optionparser.rb +2 -1
  74. data/lib/mcollective/pluginmanager.rb +3 -5
  75. data/lib/mcollective/pluginpackager.rb +1 -3
  76. data/lib/mcollective/pluginpackager/agent_definition.rb +3 -8
  77. data/lib/mcollective/pluginpackager/forge_packager.rb +7 -9
  78. data/lib/mcollective/pluginpackager/standard_definition.rb +1 -2
  79. data/lib/mcollective/registration/base.rb +18 -16
  80. data/lib/mcollective/rpc.rb +2 -4
  81. data/lib/mcollective/rpc/actionrunner.rb +16 -18
  82. data/lib/mcollective/rpc/agent.rb +26 -43
  83. data/lib/mcollective/rpc/audit.rb +1 -0
  84. data/lib/mcollective/rpc/client.rb +67 -85
  85. data/lib/mcollective/rpc/helpers.rb +55 -62
  86. data/lib/mcollective/rpc/progress.rb +2 -2
  87. data/lib/mcollective/rpc/reply.rb +17 -19
  88. data/lib/mcollective/rpc/request.rb +7 -5
  89. data/lib/mcollective/rpc/result.rb +6 -8
  90. data/lib/mcollective/rpc/stats.rb +49 -58
  91. data/lib/mcollective/security/base.rb +13 -56
  92. data/lib/mcollective/security/choria.rb +765 -0
  93. data/lib/mcollective/shell.rb +9 -4
  94. data/lib/mcollective/signer/base.rb +28 -0
  95. data/lib/mcollective/signer/choria.rb +185 -0
  96. data/lib/mcollective/ssl.rb +8 -6
  97. data/lib/mcollective/util.rb +58 -55
  98. data/lib/mcollective/util/bolt_support.rb +176 -0
  99. data/lib/mcollective/util/bolt_support/plan_runner.rb +167 -0
  100. data/lib/mcollective/util/bolt_support/task_result.rb +94 -0
  101. data/lib/mcollective/util/bolt_support/task_results.rb +128 -0
  102. data/lib/mcollective/util/choria.rb +946 -0
  103. data/lib/mcollective/util/indifferent_hash.rb +12 -0
  104. data/lib/mcollective/util/natswrapper.rb +242 -0
  105. data/lib/mcollective/util/playbook.rb +435 -0
  106. data/lib/mcollective/util/playbook/data_stores.rb +201 -0
  107. data/lib/mcollective/util/playbook/data_stores/base.rb +99 -0
  108. data/lib/mcollective/util/playbook/data_stores/consul_data_store.rb +88 -0
  109. data/lib/mcollective/util/playbook/data_stores/environment_data_store.rb +33 -0
  110. data/lib/mcollective/util/playbook/data_stores/etcd_data_store.rb +42 -0
  111. data/lib/mcollective/util/playbook/data_stores/file_data_store.rb +106 -0
  112. data/lib/mcollective/util/playbook/data_stores/shell_data_store.rb +103 -0
  113. data/lib/mcollective/util/playbook/inputs.rb +265 -0
  114. data/lib/mcollective/util/playbook/nodes.rb +207 -0
  115. data/lib/mcollective/util/playbook/nodes/mcollective_nodes.rb +86 -0
  116. data/lib/mcollective/util/playbook/nodes/pql_nodes.rb +40 -0
  117. data/lib/mcollective/util/playbook/nodes/shell_nodes.rb +55 -0
  118. data/lib/mcollective/util/playbook/nodes/terraform_nodes.rb +65 -0
  119. data/lib/mcollective/util/playbook/nodes/yaml_nodes.rb +47 -0
  120. data/lib/mcollective/util/playbook/playbook_logger.rb +47 -0
  121. data/lib/mcollective/util/playbook/puppet_logger.rb +51 -0
  122. data/lib/mcollective/util/playbook/report.rb +152 -0
  123. data/lib/mcollective/util/playbook/task_result.rb +55 -0
  124. data/lib/mcollective/util/playbook/tasks.rb +196 -0
  125. data/lib/mcollective/util/playbook/tasks/base.rb +45 -0
  126. data/lib/mcollective/util/playbook/tasks/graphite_event_task.rb +64 -0
  127. data/lib/mcollective/util/playbook/tasks/mcollective_task.rb +356 -0
  128. data/lib/mcollective/util/playbook/tasks/shell_task.rb +93 -0
  129. data/lib/mcollective/util/playbook/tasks/slack_task.rb +105 -0
  130. data/lib/mcollective/util/playbook/tasks/webhook_task.rb +136 -0
  131. data/lib/mcollective/util/playbook/template_util.rb +98 -0
  132. data/lib/mcollective/util/playbook/uses.rb +169 -0
  133. data/lib/mcollective/util/tasks_support.rb +751 -0
  134. data/lib/mcollective/util/tasks_support/cli.rb +260 -0
  135. data/lib/mcollective/util/tasks_support/default_formatter.rb +138 -0
  136. data/lib/mcollective/util/tasks_support/json_formatter.rb +108 -0
  137. data/lib/mcollective/validator.rb +6 -1
  138. data/lib/mcollective/validator/bolt_task_name_validator.ddl +7 -0
  139. data/lib/mcollective/validator/bolt_task_name_validator.rb +11 -0
  140. data/lib/mcollective/validator/length_validator.rb +1 -3
  141. metadata +65 -6
  142. data/lib/mcollective/application/describe_filter.rb +0 -87
  143. data/lib/mcollective/matcher.rb +0 -220
  144. data/lib/mcollective/matcher/parser.rb +0 -128
  145. data/lib/mcollective/matcher/scanner.rb +0 -241
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7838c880fe400df6a4ba9cc315b99f8e53cf5ed
4
- data.tar.gz: eb1af548ab4d9f79abf4accb138d6aa6becbe620
3
+ metadata.gz: 88cacd67cd1dd9b6289e5b896b920d3467e3a220
4
+ data.tar.gz: a7cf2dccf0ae9133abd81866296784fb6791b0e0
5
5
  SHA512:
6
- metadata.gz: 8e1a3b75838b504abc5e16cd6a4e653ccc70eba34a5c2fb40ac39ff4d764f5960a4535b5e6eace6ab28fc75d839c7b57f9c67613d3886f3d37364ae873878df4
7
- data.tar.gz: b0dadeac2193e6a043a00e6bc90592485db8bfdf35563787e024457b248c391b7fe5628510af7cb7d3a0ddf455359cf148968c43db0d3cd80b304ea3f97fd9b6
6
+ metadata.gz: 368859ec015b8605af21238d7c6d93aa4472c728948d61dcf07095a7728509f4fcdafb2d5867aef0b941a09572ce7ad43ec4ce54a91cde8e6de26fc48a888b9c
7
+ data.tar.gz: d1ce8dbd24f8f1a24163e4e5c69d9514d98372885bf14b6f3efd59b824c842d5ed2efee50df7551eec577e0dd15cfc7da36f66f732b6fd35ab74ca7f30f8d9cc
@@ -40,7 +40,6 @@ module MCollective
40
40
  require "mcollective/facts"
41
41
  require "mcollective/logger"
42
42
  require "mcollective/log"
43
- require "mcollective/matcher"
44
43
  require "mcollective/message"
45
44
  require "mcollective/optionparser"
46
45
  require "mcollective/generators"
@@ -54,7 +53,7 @@ module MCollective
54
53
  require "mcollective/util"
55
54
  require "mcollective/validator"
56
55
 
57
- VERSION = "2.21.1".freeze
56
+ VERSION = "2.23.1".freeze
58
57
 
59
58
  def self.version
60
59
  VERSION
@@ -0,0 +1,253 @@
1
+ metadata :name => "bolt_tasks",
2
+ :description => "Downloads and runs Puppet Tasks",
3
+ :author => "R.I.Pienaar <rip@devco.net>",
4
+ :license => "Apache-2.0",
5
+ :version => "0.19.0",
6
+ :url => "https://choria.io",
7
+ :timeout => 60
8
+
9
+ requires :mcollective => "2.11.0"
10
+
11
+ action "download", :description => "Downloads a Puppet Task into a local cache" do
12
+ input :task,
13
+ :prompt => "Task Name",
14
+ :description => "The name of a task, example apache or apache::reload",
15
+ :type => :string,
16
+ :validation => :bolt_task_name,
17
+ :optional => false,
18
+ :maxlength => 100
19
+
20
+ input :environment,
21
+ :prompt => "Puppet Environment",
22
+ :description => "The environment the task should be fetched from",
23
+ :type => :string,
24
+ :validation => '\A[a-z][a-z0-9_]*\z',
25
+ :optional => false,
26
+ :default => "production",
27
+ :maxlength => 100
28
+
29
+ input :files,
30
+ :prompt => "Task Files Specification",
31
+ :description => "The specification of files to download according to v3 api in JSON format",
32
+ :type => :string,
33
+ :optional => false,
34
+ :validation => '\A\[.+\]\z',
35
+ :maxlength => 4000
36
+
37
+ output :downloads,
38
+ :description => "The number of files downloaded",
39
+ :display_as => "Files Downloaded"
40
+
41
+ summarize do
42
+ aggregate summary(:downloads)
43
+ end
44
+ end
45
+
46
+ action "run_and_wait", :description => "Runs a Puppet Task that was previously downloaded, wait for it to finish" do
47
+ input :task,
48
+ :prompt => "Task Name",
49
+ :description => "The name of a task, example apache or apache::reload",
50
+ :type => :string,
51
+ :validation => :bolt_task_name,
52
+ :optional => false,
53
+ :maxlength => 100
54
+
55
+ input :input_method,
56
+ :prompt => "Input Method",
57
+ :description => "The input method to use",
58
+ :type => :list,
59
+ :list => ["powershell", "stdin", "environment", "both"],
60
+ :optional => true,
61
+ :default => nil
62
+
63
+ input :files,
64
+ :prompt => "Task Files Specification",
65
+ :description => "The specification of files to download according to v3 api in JSON format",
66
+ :type => :string,
67
+ :optional => false,
68
+ :validation => '\A\[.+\]\z',
69
+ :maxlength => 4000
70
+
71
+ input :input,
72
+ :prompt => "Task Input",
73
+ :description => "JSON String containing input variables",
74
+ :type => :string,
75
+ :validation => '^.+$',
76
+ :optional => false,
77
+ :default => "{}",
78
+ :maxlength => 102400
79
+
80
+ input :run_as,
81
+ :prompt => "Run As",
82
+ :description => "User to run the task as",
83
+ :type => :string,
84
+ :validation => ".+",
85
+ :optional => true,
86
+ :default => nil,
87
+ :maxlength => 32
88
+
89
+ output :task_id,
90
+ :description => "The ID the task was created with",
91
+ :display_as => "Task ID",
92
+ :default => nil
93
+
94
+ output :task,
95
+ :description => "Task name",
96
+ :display_as => "Task",
97
+ :default => nil
98
+
99
+ output :callerid,
100
+ :description => "User who initiated the task",
101
+ :display_as => "User",
102
+ :default => nil
103
+
104
+ output :exitcode,
105
+ :description => "Task exit code",
106
+ :display_as => "Exit Code",
107
+ :default => 127
108
+
109
+ output :stdout,
110
+ :description => "Standard Output from the command",
111
+ :display_as => "STDOUT",
112
+ :default => nil
113
+
114
+ output :stderr,
115
+ :description => "Standard Error from the command",
116
+ :display_as => "STDERR",
117
+ :default => nil
118
+
119
+ output :completed,
120
+ :description => "Did the task complete",
121
+ :display_as => "Completed",
122
+ :default => false
123
+
124
+ output :runtime,
125
+ :description => "Time taken to run the command",
126
+ :display_as => "Runtime",
127
+ :default => 0
128
+
129
+ output :start_time,
130
+ :description => "When the task was started in UTC time",
131
+ :display_as => "Start Time"
132
+
133
+ summarize do
134
+ aggregate average(:runtime)
135
+ aggregate summary(:task)
136
+ aggregate summary(:callerid)
137
+ aggregate summary(:exitcode)
138
+ aggregate summary(:completed)
139
+ aggregate summary(:task_id)
140
+ end
141
+ end
142
+
143
+ action "run_no_wait", :description => "Runs a Puppet Task that was previously downloaded do not wait for it to finish" do
144
+ input :task,
145
+ :prompt => "Task Name",
146
+ :description => "The name of a task, example apache or apache::reload",
147
+ :type => :string,
148
+ :validation => :bolt_task_name,
149
+ :optional => false,
150
+ :maxlength => 100
151
+
152
+ input :input_method,
153
+ :prompt => "Input Method",
154
+ :description => "The input method to use",
155
+ :type => :list,
156
+ :list => ["powershell", "stdin", "environment", "both"],
157
+ :optional => true,
158
+ :default => nil
159
+
160
+ input :files,
161
+ :prompt => "Task Files Specification",
162
+ :description => "The specification of files to download according to v3 api in JSON format",
163
+ :type => :string,
164
+ :optional => false,
165
+ :validation => '\A\[.+\]\z',
166
+ :maxlength => 4000
167
+
168
+ input :input,
169
+ :prompt => "Task Input",
170
+ :description => "JSON String containing input variables",
171
+ :type => :string,
172
+ :validation => '^.+$',
173
+ :optional => true,
174
+ :default => "{}",
175
+ :maxlength => 102400
176
+
177
+ input :run_as,
178
+ :prompt => "Run As",
179
+ :description => "User to run the task as",
180
+ :type => :string,
181
+ :validation => ".+",
182
+ :optional => true,
183
+ :default => nil,
184
+ :maxlength => 32
185
+
186
+ output :task_id,
187
+ :description => "The ID the task was created with",
188
+ :display_as => "Task ID",
189
+ :default => nil
190
+
191
+ summarize do
192
+ aggregate summary(:task_id)
193
+ end
194
+ end
195
+
196
+ action "task_status", :description => "Request the status of a previously ran task" do
197
+ display :always
198
+
199
+ input :task_id,
200
+ :prompt => "Task ID",
201
+ :description => "The Task ID to retrieve",
202
+ :type => :string,
203
+ :validation => '^[a-z,0-9]{32}$',
204
+ :optional => false,
205
+ :maxlength => 32
206
+
207
+ output :task,
208
+ :description => "Task name",
209
+ :display_as => "Task",
210
+ :default => nil
211
+
212
+ output :callerid,
213
+ :description => "User who initiated the task",
214
+ :display_as => "User",
215
+ :default => nil
216
+
217
+ output :exitcode,
218
+ :description => "Task exit code",
219
+ :display_as => "Exit Code",
220
+ :default => 127
221
+
222
+ output :stdout,
223
+ :description => "Standard Output from the command",
224
+ :display_as => "STDOUT",
225
+ :default => nil
226
+
227
+ output :stderr,
228
+ :description => "Standard Error from the command",
229
+ :display_as => "STDERR",
230
+ :default => nil
231
+
232
+ output :completed,
233
+ :description => "Did the task complete",
234
+ :display_as => "Completed",
235
+ :default => false
236
+
237
+ output :runtime,
238
+ :description => "Time taken to run the command",
239
+ :display_as => "Runtime",
240
+ :default => 0
241
+
242
+ output :start_time,
243
+ :description => "When the task was started in UTC time",
244
+ :display_as => "Start Time"
245
+
246
+ summarize do
247
+ aggregate average(:runtime)
248
+ aggregate summary(:task)
249
+ aggregate summary(:callerid)
250
+ aggregate summary(:exitcode)
251
+ aggregate summary(:completed)
252
+ end
253
+ end
@@ -0,0 +1,365 @@
1
+ {
2
+ "$schema": "https://choria.io/schemas/mcorpc/ddl/v1/agent.json",
3
+ "metadata": {
4
+ "name": "bolt_tasks",
5
+ "description": "Downloads and runs Puppet Tasks",
6
+ "author": "R.I.Pienaar <rip@devco.net>",
7
+ "license": "Apache-2.0",
8
+ "version": "0.19.0",
9
+ "url": "https://choria.io",
10
+ "timeout": 60
11
+ },
12
+ "actions": [
13
+ {
14
+ "action": "download",
15
+ "input": {
16
+ "task": {
17
+ "prompt": "Task Name",
18
+ "description": "The name of a task, example apache or apache::reload",
19
+ "type": "string",
20
+ "default": null,
21
+ "optional": false,
22
+ "validation": "bolt_task_name",
23
+ "maxlength": 100
24
+ },
25
+ "environment": {
26
+ "prompt": "Puppet Environment",
27
+ "description": "The environment the task should be fetched from",
28
+ "type": "string",
29
+ "default": "production",
30
+ "optional": false,
31
+ "validation": "\\A[a-z][a-z0-9_]*\\z",
32
+ "maxlength": 100
33
+ },
34
+ "files": {
35
+ "prompt": "Task Files Specification",
36
+ "description": "The specification of files to download according to v3 api in JSON format",
37
+ "type": "string",
38
+ "default": null,
39
+ "optional": false,
40
+ "validation": "\\A\\[.+\\]\\z",
41
+ "maxlength": 4000
42
+ }
43
+ },
44
+ "output": {
45
+ "downloads": {
46
+ "description": "The number of files downloaded",
47
+ "display_as": "Files Downloaded",
48
+ "default": null
49
+ }
50
+ },
51
+ "display": "failed",
52
+ "description": "Downloads a Puppet Task into a local cache",
53
+ "aggregate": [
54
+ {
55
+ "function": "summary",
56
+ "args": [
57
+ "downloads"
58
+ ]
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "action": "run_and_wait",
64
+ "input": {
65
+ "task": {
66
+ "prompt": "Task Name",
67
+ "description": "The name of a task, example apache or apache::reload",
68
+ "type": "string",
69
+ "default": null,
70
+ "optional": false,
71
+ "validation": "bolt_task_name",
72
+ "maxlength": 100
73
+ },
74
+ "input_method": {
75
+ "prompt": "Input Method",
76
+ "description": "The input method to use",
77
+ "type": "list",
78
+ "default": null,
79
+ "optional": true,
80
+ "list": [
81
+ "powershell",
82
+ "stdin",
83
+ "environment",
84
+ "both"
85
+ ]
86
+ },
87
+ "files": {
88
+ "prompt": "Task Files Specification",
89
+ "description": "The specification of files to download according to v3 api in JSON format",
90
+ "type": "string",
91
+ "default": null,
92
+ "optional": false,
93
+ "validation": "\\A\\[.+\\]\\z",
94
+ "maxlength": 4000
95
+ },
96
+ "input": {
97
+ "prompt": "Task Input",
98
+ "description": "JSON String containing input variables",
99
+ "type": "string",
100
+ "default": "{}",
101
+ "optional": false,
102
+ "validation": "^.+$",
103
+ "maxlength": 102400
104
+ },
105
+ "run_as": {
106
+ "prompt": "Run As",
107
+ "description": "User to run the task as",
108
+ "type": "string",
109
+ "default": null,
110
+ "optional": true,
111
+ "validation": ".+",
112
+ "maxlength": 32
113
+ }
114
+ },
115
+ "output": {
116
+ "task_id": {
117
+ "description": "The ID the task was created with",
118
+ "display_as": "Task ID",
119
+ "default": null
120
+ },
121
+ "task": {
122
+ "description": "Task name",
123
+ "display_as": "Task",
124
+ "default": null
125
+ },
126
+ "callerid": {
127
+ "description": "User who initiated the task",
128
+ "display_as": "User",
129
+ "default": null
130
+ },
131
+ "exitcode": {
132
+ "description": "Task exit code",
133
+ "display_as": "Exit Code",
134
+ "default": 127
135
+ },
136
+ "stdout": {
137
+ "description": "Standard Output from the command",
138
+ "display_as": "STDOUT",
139
+ "default": null
140
+ },
141
+ "stderr": {
142
+ "description": "Standard Error from the command",
143
+ "display_as": "STDERR",
144
+ "default": null
145
+ },
146
+ "completed": {
147
+ "description": "Did the task complete",
148
+ "display_as": "Completed",
149
+ "default": false
150
+ },
151
+ "runtime": {
152
+ "description": "Time taken to run the command",
153
+ "display_as": "Runtime",
154
+ "default": 0
155
+ },
156
+ "start_time": {
157
+ "description": "When the task was started in UTC time",
158
+ "display_as": "Start Time",
159
+ "default": null
160
+ }
161
+ },
162
+ "display": "failed",
163
+ "description": "Runs a Puppet Task that was previously downloaded, wait for it to finish",
164
+ "aggregate": [
165
+ {
166
+ "function": "average",
167
+ "args": [
168
+ "runtime"
169
+ ]
170
+ },
171
+ {
172
+ "function": "summary",
173
+ "args": [
174
+ "task"
175
+ ]
176
+ },
177
+ {
178
+ "function": "summary",
179
+ "args": [
180
+ "callerid"
181
+ ]
182
+ },
183
+ {
184
+ "function": "summary",
185
+ "args": [
186
+ "exitcode"
187
+ ]
188
+ },
189
+ {
190
+ "function": "summary",
191
+ "args": [
192
+ "completed"
193
+ ]
194
+ },
195
+ {
196
+ "function": "summary",
197
+ "args": [
198
+ "task_id"
199
+ ]
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "action": "run_no_wait",
205
+ "input": {
206
+ "task": {
207
+ "prompt": "Task Name",
208
+ "description": "The name of a task, example apache or apache::reload",
209
+ "type": "string",
210
+ "default": null,
211
+ "optional": false,
212
+ "validation": "bolt_task_name",
213
+ "maxlength": 100
214
+ },
215
+ "input_method": {
216
+ "prompt": "Input Method",
217
+ "description": "The input method to use",
218
+ "type": "list",
219
+ "default": null,
220
+ "optional": true,
221
+ "list": [
222
+ "powershell",
223
+ "stdin",
224
+ "environment",
225
+ "both"
226
+ ]
227
+ },
228
+ "files": {
229
+ "prompt": "Task Files Specification",
230
+ "description": "The specification of files to download according to v3 api in JSON format",
231
+ "type": "string",
232
+ "default": null,
233
+ "optional": false,
234
+ "validation": "\\A\\[.+\\]\\z",
235
+ "maxlength": 4000
236
+ },
237
+ "input": {
238
+ "prompt": "Task Input",
239
+ "description": "JSON String containing input variables",
240
+ "type": "string",
241
+ "default": "{}",
242
+ "optional": true,
243
+ "validation": "^.+$",
244
+ "maxlength": 102400
245
+ },
246
+ "run_as": {
247
+ "prompt": "Run As",
248
+ "description": "User to run the task as",
249
+ "type": "string",
250
+ "default": null,
251
+ "optional": true,
252
+ "validation": ".+",
253
+ "maxlength": 32
254
+ }
255
+ },
256
+ "output": {
257
+ "task_id": {
258
+ "description": "The ID the task was created with",
259
+ "display_as": "Task ID",
260
+ "default": null
261
+ }
262
+ },
263
+ "display": "failed",
264
+ "description": "Runs a Puppet Task that was previously downloaded do not wait for it to finish",
265
+ "aggregate": [
266
+ {
267
+ "function": "summary",
268
+ "args": [
269
+ "task_id"
270
+ ]
271
+ }
272
+ ]
273
+ },
274
+ {
275
+ "action": "task_status",
276
+ "input": {
277
+ "task_id": {
278
+ "prompt": "Task ID",
279
+ "description": "The Task ID to retrieve",
280
+ "type": "string",
281
+ "default": null,
282
+ "optional": false,
283
+ "validation": "^[a-z,0-9]{32}$",
284
+ "maxlength": 32
285
+ }
286
+ },
287
+ "output": {
288
+ "task": {
289
+ "description": "Task name",
290
+ "display_as": "Task",
291
+ "default": null
292
+ },
293
+ "callerid": {
294
+ "description": "User who initiated the task",
295
+ "display_as": "User",
296
+ "default": null
297
+ },
298
+ "exitcode": {
299
+ "description": "Task exit code",
300
+ "display_as": "Exit Code",
301
+ "default": 127
302
+ },
303
+ "stdout": {
304
+ "description": "Standard Output from the command",
305
+ "display_as": "STDOUT",
306
+ "default": null
307
+ },
308
+ "stderr": {
309
+ "description": "Standard Error from the command",
310
+ "display_as": "STDERR",
311
+ "default": null
312
+ },
313
+ "completed": {
314
+ "description": "Did the task complete",
315
+ "display_as": "Completed",
316
+ "default": false
317
+ },
318
+ "runtime": {
319
+ "description": "Time taken to run the command",
320
+ "display_as": "Runtime",
321
+ "default": 0
322
+ },
323
+ "start_time": {
324
+ "description": "When the task was started in UTC time",
325
+ "display_as": "Start Time",
326
+ "default": null
327
+ }
328
+ },
329
+ "display": "always",
330
+ "description": "Request the status of a previously ran task",
331
+ "aggregate": [
332
+ {
333
+ "function": "average",
334
+ "args": [
335
+ "runtime"
336
+ ]
337
+ },
338
+ {
339
+ "function": "summary",
340
+ "args": [
341
+ "task"
342
+ ]
343
+ },
344
+ {
345
+ "function": "summary",
346
+ "args": [
347
+ "callerid"
348
+ ]
349
+ },
350
+ {
351
+ "function": "summary",
352
+ "args": [
353
+ "exitcode"
354
+ ]
355
+ },
356
+ {
357
+ "function": "summary",
358
+ "args": [
359
+ "completed"
360
+ ]
361
+ }
362
+ ]
363
+ }
364
+ ]
365
+ }