choria-mcorpc-support 2.22.1 → 2.23.0.pre

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