Debian Codegraph @

ansible_collections/community/okd/docs/community.okd.openshift_build_module.rst

raw
1 .. _community.okd.openshift_build_module:
2
3
4 *****************************
5 community.okd.openshift_build
6 *****************************
7
8 **Start a new build or Cancel running, pending, or new builds.**
9
10
11 Version added: 2.3.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module starts a new build from the provided build config or build name.
21 - This module also cancel a new, pending or running build by requesting a graceful shutdown of the build. There may be a delay between requesting the build and the time the build is terminated.
22 - This can also restart a new build when the current is cancelled.
23 - Analogous to ``oc cancel-build`` and ``oc start-build``.
24
25
26
27 Requirements
28 ------------
29 The below requirements are needed on the host that executes this module.
30
31 - python >= 3.6
32 - kubernetes >= 12.0.0
33
34
35 Parameters
36 ----------
37
38 .. raw:: html
39
40 <table border=0 cellpadding=0 class="documentation-table">
41 <tr>
42 <th colspan="2">Parameter</th>
43 <th>Choices/<font color="blue">Defaults</font></th>
44 <th width="100%">Comments</th>
45 </tr>
46 <tr>
47 <td colspan="2">
48 <div class="ansibleOptionAnchor" id="parameter-"></div>
49 <b>api_key</b>
50 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
51 <div style="font-size: small">
52 <span style="color: purple">string</span>
53 </div>
54 </td>
55 <td>
56 </td>
57 <td>
58 <div>Token used to authenticate with the API. Can also be specified via K8S_AUTH_API_KEY environment variable.</div>
59 </td>
60 </tr>
61 <tr>
62 <td colspan="2">
63 <div class="ansibleOptionAnchor" id="parameter-"></div>
64 <b>build_args</b>
65 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
66 <div style="font-size: small">
67 <span style="color: purple">list</span>
68 / <span style="color: purple">elements=dictionary</span>
69 </div>
70 </td>
71 <td>
72 </td>
73 <td>
74 <div>Specify a list of key-value pair to pass to Docker during the build.</div>
75 </td>
76 </tr>
77 <tr>
78 <td class="elbow-placeholder"></td>
79 <td colspan="1">
80 <div class="ansibleOptionAnchor" id="parameter-"></div>
81 <b>name</b>
82 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
83 <div style="font-size: small">
84 <span style="color: purple">string</span>
85 / <span style="color: red">required</span>
86 </div>
87 </td>
88 <td>
89 </td>
90 <td>
91 <div>docker build argument name.</div>
92 </td>
93 </tr>
94 <tr>
95 <td class="elbow-placeholder"></td>
96 <td colspan="1">
97 <div class="ansibleOptionAnchor" id="parameter-"></div>
98 <b>value</b>
99 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
100 <div style="font-size: small">
101 <span style="color: purple">string</span>
102 / <span style="color: red">required</span>
103 </div>
104 </td>
105 <td>
106 </td>
107 <td>
108 <div>docker build argument value.</div>
109 </td>
110 </tr>
111
112 <tr>
113 <td colspan="2">
114 <div class="ansibleOptionAnchor" id="parameter-"></div>
115 <b>build_config_name</b>
116 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
117 <div style="font-size: small">
118 <span style="color: purple">string</span>
119 </div>
120 </td>
121 <td>
122 </td>
123 <td>
124 <div>Specify the name of a build config from which a new build will be run.</div>
125 <div>Mutually exclusive with parameter <em>build_name</em>.</div>
126 </td>
127 </tr>
128 <tr>
129 <td colspan="2">
130 <div class="ansibleOptionAnchor" id="parameter-"></div>
131 <b>build_name</b>
132 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
133 <div style="font-size: small">
134 <span style="color: purple">string</span>
135 </div>
136 </td>
137 <td>
138 </td>
139 <td>
140 <div>Specify the name of a build which should be re-run.</div>
141 <div>Mutually exclusive with parameter <em>build_config_name</em>.</div>
142 </td>
143 </tr>
144 <tr>
145 <td colspan="2">
146 <div class="ansibleOptionAnchor" id="parameter-"></div>
147 <b>build_phases</b>
148 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
149 <div style="font-size: small">
150 <span style="color: purple">list</span>
151 / <span style="color: purple">elements=string</span>
152 </div>
153 </td>
154 <td>
155 <ul style="margin: 0; padding: 0"><b>Choices:</b>
156 <li>New</li>
157 <li>Pending</li>
158 <li>Running</li>
159 </ul>
160 <b>Default:</b><br/><div style="color: blue">[]</div>
161 </td>
162 <td>
163 <div>List of state for build to cancel.</div>
164 <div>Ignored when <code>state=started</code>.</div>
165 </td>
166 </tr>
167 <tr>
168 <td colspan="2">
169 <div class="ansibleOptionAnchor" id="parameter-"></div>
170 <b>ca_cert</b>
171 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
172 <div style="font-size: small">
173 <span style="color: purple">path</span>
174 </div>
175 </td>
176 <td>
177 </td>
178 <td>
179 <div>Path to a CA certificate used to authenticate with the API. The full certificate chain must be provided to avoid certificate validation errors. Can also be specified via K8S_AUTH_SSL_CA_CERT environment variable.</div>
180 <div style="font-size: small; color: darkgreen"><br/>aliases: ssl_ca_cert</div>
181 </td>
182 </tr>
183 <tr>
184 <td colspan="2">
185 <div class="ansibleOptionAnchor" id="parameter-"></div>
186 <b>client_cert</b>
187 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
188 <div style="font-size: small">
189 <span style="color: purple">path</span>
190 </div>
191 </td>
192 <td>
193 </td>
194 <td>
195 <div>Path to a certificate used to authenticate with the API. Can also be specified via K8S_AUTH_CERT_FILE environment variable.</div>
196 <div style="font-size: small; color: darkgreen"><br/>aliases: cert_file</div>
197 </td>
198 </tr>
199 <tr>
200 <td colspan="2">
201 <div class="ansibleOptionAnchor" id="parameter-"></div>
202 <b>client_key</b>
203 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
204 <div style="font-size: small">
205 <span style="color: purple">path</span>
206 </div>
207 </td>
208 <td>
209 </td>
210 <td>
211 <div>Path to a key file used to authenticate with the API. Can also be specified via K8S_AUTH_KEY_FILE environment variable.</div>
212 <div style="font-size: small; color: darkgreen"><br/>aliases: key_file</div>
213 </td>
214 </tr>
215 <tr>
216 <td colspan="2">
217 <div class="ansibleOptionAnchor" id="parameter-"></div>
218 <b>commit</b>
219 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
220 <div style="font-size: small">
221 <span style="color: purple">string</span>
222 </div>
223 </td>
224 <td>
225 </td>
226 <td>
227 <div>Specify the source code commit identifier the build should use; requires a build based on a Git repository.</div>
228 </td>
229 </tr>
230 <tr>
231 <td colspan="2">
232 <div class="ansibleOptionAnchor" id="parameter-"></div>
233 <b>context</b>
234 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
235 <div style="font-size: small">
236 <span style="color: purple">string</span>
237 </div>
238 </td>
239 <td>
240 </td>
241 <td>
242 <div>The name of a context found in the config file. Can also be specified via K8S_AUTH_CONTEXT environment variable.</div>
243 </td>
244 </tr>
245 <tr>
246 <td colspan="2">
247 <div class="ansibleOptionAnchor" id="parameter-"></div>
248 <b>env_vars</b>
249 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
250 <div style="font-size: small">
251 <span style="color: purple">list</span>
252 / <span style="color: purple">elements=dictionary</span>
253 </div>
254 </td>
255 <td>
256 </td>
257 <td>
258 <div>Specify a list of key-value pair for an environment variable to set for the build container.</div>
259 </td>
260 </tr>
261 <tr>
262 <td class="elbow-placeholder"></td>
263 <td colspan="1">
264 <div class="ansibleOptionAnchor" id="parameter-"></div>
265 <b>name</b>
266 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
267 <div style="font-size: small">
268 <span style="color: purple">string</span>
269 / <span style="color: red">required</span>
270 </div>
271 </td>
272 <td>
273 </td>
274 <td>
275 <div>Environment variable name.</div>
276 </td>
277 </tr>
278 <tr>
279 <td class="elbow-placeholder"></td>
280 <td colspan="1">
281 <div class="ansibleOptionAnchor" id="parameter-"></div>
282 <b>value</b>
283 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
284 <div style="font-size: small">
285 <span style="color: purple">string</span>
286 / <span style="color: red">required</span>
287 </div>
288 </td>
289 <td>
290 </td>
291 <td>
292 <div>Environment variable value.</div>
293 </td>
294 </tr>
295
296 <tr>
297 <td colspan="2">
298 <div class="ansibleOptionAnchor" id="parameter-"></div>
299 <b>host</b>
300 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
301 <div style="font-size: small">
302 <span style="color: purple">string</span>
303 </div>
304 </td>
305 <td>
306 </td>
307 <td>
308 <div>Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.</div>
309 </td>
310 </tr>
311 <tr>
312 <td colspan="2">
313 <div class="ansibleOptionAnchor" id="parameter-"></div>
314 <b>impersonate_groups</b>
315 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
316 <div style="font-size: small">
317 <span style="color: purple">list</span>
318 / <span style="color: purple">elements=string</span>
319 </div>
320 <div style="font-style: italic; font-size: small; color: darkgreen">added in 2.3.0</div>
321 </td>
322 <td>
323 </td>
324 <td>
325 <div>Group(s) to impersonate for the operation.</div>
326 <div>Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2</div>
327 </td>
328 </tr>
329 <tr>
330 <td colspan="2">
331 <div class="ansibleOptionAnchor" id="parameter-"></div>
332 <b>impersonate_user</b>
333 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
334 <div style="font-size: small">
335 <span style="color: purple">string</span>
336 </div>
337 <div style="font-style: italic; font-size: small; color: darkgreen">added in 2.3.0</div>
338 </td>
339 <td>
340 </td>
341 <td>
342 <div>Username to impersonate for the operation.</div>
343 <div>Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.</div>
344 </td>
345 </tr>
346 <tr>
347 <td colspan="2">
348 <div class="ansibleOptionAnchor" id="parameter-"></div>
349 <b>incremental</b>
350 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
351 <div style="font-size: small">
352 <span style="color: purple">boolean</span>
353 </div>
354 </td>
355 <td>
356 <ul style="margin: 0; padding: 0"><b>Choices:</b>
357 <li>no</li>
358 <li>yes</li>
359 </ul>
360 </td>
361 <td>
362 <div>Overrides the incremental setting in a source-strategy build, ignored if not specified.</div>
363 </td>
364 </tr>
365 <tr>
366 <td colspan="2">
367 <div class="ansibleOptionAnchor" id="parameter-"></div>
368 <b>kubeconfig</b>
369 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
370 <div style="font-size: small">
371 <span style="color: purple">raw</span>
372 </div>
373 </td>
374 <td>
375 </td>
376 <td>
377 <div>Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the Kubernetes client will attempt to load the default configuration file from <em>~/.kube/config</em>. Can also be specified via K8S_AUTH_KUBECONFIG environment variable.</div>
378 <div>Multiple Kubernetes config file can be provided using separator &#x27;;&#x27; for Windows platform or &#x27;:&#x27; for others platforms.</div>
379 <div>The kubernetes configuration can be provided as dictionary. This feature requires a python kubernetes client version &gt;= 17.17.0. Added in version 2.2.0.</div>
380 </td>
381 </tr>
382 <tr>
383 <td colspan="2">
384 <div class="ansibleOptionAnchor" id="parameter-"></div>
385 <b>namespace</b>
386 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
387 <div style="font-size: small">
388 <span style="color: purple">string</span>
389 / <span style="color: red">required</span>
390 </div>
391 </td>
392 <td>
393 </td>
394 <td>
395 <div>Specify the namespace for the build or the build config.</div>
396 </td>
397 </tr>
398 <tr>
399 <td colspan="2">
400 <div class="ansibleOptionAnchor" id="parameter-"></div>
401 <b>no_cache</b>
402 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
403 <div style="font-size: small">
404 <span style="color: purple">boolean</span>
405 </div>
406 </td>
407 <td>
408 <ul style="margin: 0; padding: 0"><b>Choices:</b>
409 <li>no</li>
410 <li>yes</li>
411 </ul>
412 </td>
413 <td>
414 <div>Overrides the noCache setting in a docker-strategy build, ignored if not specified.</div>
415 </td>
416 </tr>
417 <tr>
418 <td colspan="2">
419 <div class="ansibleOptionAnchor" id="parameter-"></div>
420 <b>no_proxy</b>
421 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
422 <div style="font-size: small">
423 <span style="color: purple">string</span>
424 </div>
425 <div style="font-style: italic; font-size: small; color: darkgreen">added in 2.3.0</div>
426 </td>
427 <td>
428 </td>
429 <td>
430 <div>The comma separated list of hosts/domains/IP/CIDR that shouldn&#x27;t go through proxy. Can also be specified via K8S_AUTH_NO_PROXY environment variable.</div>
431 <div>Please note that this module does not pick up typical proxy settings from the environment (e.g. NO_PROXY).</div>
432 <div>This feature requires kubernetes&gt;=19.15.0. When kubernetes library is less than 19.15.0, it fails even no_proxy set in correct.</div>
433 <div>example value is &quot;localhost,.local,.example.com,127.0.0.1,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16&quot;</div>
434 </td>
435 </tr>
436 <tr>
437 <td colspan="2">
438 <div class="ansibleOptionAnchor" id="parameter-"></div>
439 <b>password</b>
440 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
441 <div style="font-size: small">
442 <span style="color: purple">string</span>
443 </div>
444 </td>
445 <td>
446 </td>
447 <td>
448 <div>Provide a password for authenticating with the API. Can also be specified via K8S_AUTH_PASSWORD environment variable.</div>
449 <div>Please read the description of the <code>username</code> option for a discussion of when this option is applicable.</div>
450 </td>
451 </tr>
452 <tr>
453 <td colspan="2">
454 <div class="ansibleOptionAnchor" id="parameter-"></div>
455 <b>persist_config</b>
456 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
457 <div style="font-size: small">
458 <span style="color: purple">boolean</span>
459 </div>
460 </td>
461 <td>
462 <ul style="margin: 0; padding: 0"><b>Choices:</b>
463 <li>no</li>
464 <li>yes</li>
465 </ul>
466 </td>
467 <td>
468 <div>Whether or not to save the kube config refresh tokens. Can also be specified via K8S_AUTH_PERSIST_CONFIG environment variable.</div>
469 <div>When the k8s context is using a user credentials with refresh tokens (like oidc or gke/gcloud auth), the token is refreshed by the k8s python client library but not saved by default. So the old refresh token can expire and the next auth might fail. Setting this flag to true will tell the k8s python client to save the new refresh token to the kube config file.</div>
470 <div>Default to false.</div>
471 <div>Please note that the current version of the k8s python client library does not support setting this flag to True yet.</div>
472 <div>The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169</div>
473 </td>
474 </tr>
475 <tr>
476 <td colspan="2">
477 <div class="ansibleOptionAnchor" id="parameter-"></div>
478 <b>proxy</b>
479 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
480 <div style="font-size: small">
481 <span style="color: purple">string</span>
482 </div>
483 </td>
484 <td>
485 </td>
486 <td>
487 <div>The URL of an HTTP proxy to use for the connection. Can also be specified via K8S_AUTH_PROXY environment variable.</div>
488 <div>Please note that this module does not pick up typical proxy settings from the environment (e.g. HTTP_PROXY).</div>
489 </td>
490 </tr>
491 <tr>
492 <td colspan="2">
493 <div class="ansibleOptionAnchor" id="parameter-"></div>
494 <b>proxy_headers</b>
495 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
496 <div style="font-size: small">
497 <span style="color: purple">dictionary</span>
498 </div>
499 <div style="font-style: italic; font-size: small; color: darkgreen">added in 2.0.0</div>
500 </td>
501 <td>
502 </td>
503 <td>
504 <div>The Header used for the HTTP proxy.</div>
505 <div>Documentation can be found here <a href='https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html?highlight=proxy_headers#urllib3.util.make_headers'>https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html?highlight=proxy_headers#urllib3.util.make_headers</a>.</div>
506 </td>
507 </tr>
508 <tr>
509 <td class="elbow-placeholder"></td>
510 <td colspan="1">
511 <div class="ansibleOptionAnchor" id="parameter-"></div>
512 <b>basic_auth</b>
513 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
514 <div style="font-size: small">
515 <span style="color: purple">string</span>
516 </div>
517 </td>
518 <td>
519 </td>
520 <td>
521 <div>Colon-separated username:password for basic authentication header.</div>
522 <div>Can also be specified via K8S_AUTH_PROXY_HEADERS_BASIC_AUTH environment.</div>
523 </td>
524 </tr>
525 <tr>
526 <td class="elbow-placeholder"></td>
527 <td colspan="1">
528 <div class="ansibleOptionAnchor" id="parameter-"></div>
529 <b>proxy_basic_auth</b>
530 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
531 <div style="font-size: small">
532 <span style="color: purple">string</span>
533 </div>
534 </td>
535 <td>
536 </td>
537 <td>
538 <div>Colon-separated username:password for proxy basic authentication header.</div>
539 <div>Can also be specified via K8S_AUTH_PROXY_HEADERS_PROXY_BASIC_AUTH environment.</div>
540 </td>
541 </tr>
542 <tr>
543 <td class="elbow-placeholder"></td>
544 <td colspan="1">
545 <div class="ansibleOptionAnchor" id="parameter-"></div>
546 <b>user_agent</b>
547 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
548 <div style="font-size: small">
549 <span style="color: purple">string</span>
550 </div>
551 </td>
552 <td>
553 </td>
554 <td>
555 <div>String representing the user-agent you want, such as foo/1.0.</div>
556 <div>Can also be specified via K8S_AUTH_PROXY_HEADERS_USER_AGENT environment.</div>
557 </td>
558 </tr>
559
560 <tr>
561 <td colspan="2">
562 <div class="ansibleOptionAnchor" id="parameter-"></div>
563 <b>state</b>
564 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
565 <div style="font-size: small">
566 <span style="color: purple">string</span>
567 </div>
568 </td>
569 <td>
570 <ul style="margin: 0; padding: 0"><b>Choices:</b>
571 <li><div style="color: blue"><b>started</b>&nbsp;&larr;</div></li>
572 <li>cancelled</li>
573 <li>restarted</li>
574 </ul>
575 </td>
576 <td>
577 <div>Determines if a Build should be started ,cancelled or restarted.</div>
578 <div>When set to <code>restarted</code> a new build will be created after the current build is cancelled.</div>
579 </td>
580 </tr>
581 <tr>
582 <td colspan="2">
583 <div class="ansibleOptionAnchor" id="parameter-"></div>
584 <b>username</b>
585 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
586 <div style="font-size: small">
587 <span style="color: purple">string</span>
588 </div>
589 </td>
590 <td>
591 </td>
592 <td>
593 <div>Provide a username for authenticating with the API. Can also be specified via K8S_AUTH_USERNAME environment variable.</div>
594 <div>Please note that this only works with clusters configured to use HTTP Basic Auth. If your cluster has a different form of authentication (e.g. OAuth2 in OpenShift), this option will not work as expected and you should look into the <span class='module'>community.okd.k8s_auth</span> module, as that might do what you need.</div>
595 </td>
596 </tr>
597 <tr>
598 <td colspan="2">
599 <div class="ansibleOptionAnchor" id="parameter-"></div>
600 <b>validate_certs</b>
601 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
602 <div style="font-size: small">
603 <span style="color: purple">boolean</span>
604 </div>
605 </td>
606 <td>
607 <ul style="margin: 0; padding: 0"><b>Choices:</b>
608 <li>no</li>
609 <li>yes</li>
610 </ul>
611 </td>
612 <td>
613 <div>Whether or not to verify the API server&#x27;s SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL environment variable.</div>
614 <div style="font-size: small; color: darkgreen"><br/>aliases: verify_ssl</div>
615 </td>
616 </tr>
617 <tr>
618 <td colspan="2">
619 <div class="ansibleOptionAnchor" id="parameter-"></div>
620 <b>wait</b>
621 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
622 <div style="font-size: small">
623 <span style="color: purple">boolean</span>
624 </div>
625 </td>
626 <td>
627 <ul style="margin: 0; padding: 0"><b>Choices:</b>
628 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
629 <li>yes</li>
630 </ul>
631 </td>
632 <td>
633 <div>When <code>state=started</code>, specify whether to wait for a build to complete and exit with a non-zero return code if the build fails.</div>
634 <div>When <em>state=cancelled</em>, specify whether to wait for a build phase to be Cancelled.</div>
635 </td>
636 </tr>
637 <tr>
638 <td colspan="2">
639 <div class="ansibleOptionAnchor" id="parameter-"></div>
640 <b>wait_sleep</b>
641 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
642 <div style="font-size: small">
643 <span style="color: purple">integer</span>
644 </div>
645 </td>
646 <td>
647 <b>Default:</b><br/><div style="color: blue">5</div>
648 </td>
649 <td>
650 <div>Number of seconds to sleep between checks.</div>
651 <div>Ignored if <code>wait=false</code>.</div>
652 </td>
653 </tr>
654 <tr>
655 <td colspan="2">
656 <div class="ansibleOptionAnchor" id="parameter-"></div>
657 <b>wait_timeout</b>
658 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
659 <div style="font-size: small">
660 <span style="color: purple">integer</span>
661 </div>
662 </td>
663 <td>
664 <b>Default:</b><br/><div style="color: blue">120</div>
665 </td>
666 <td>
667 <div>How long in seconds to wait for a build to complete.</div>
668 <div>Ignored if <code>wait=false</code>.</div>
669 </td>
670 </tr>
671 </table>
672 <br/>
673
674
675 Notes
676 -----
677
678 .. note::
679 - To avoid SSL certificate validation errors when ``validate_certs`` is *True*, the full certificate chain for the API server must be provided via ``ca_cert`` or in the kubeconfig file.
680
681
682
683 Examples
684 --------
685
686 .. code-block:: yaml
687
688 # Starts build from build config default/hello-world
689 - name: Starts build from build config
690 community.okd.openshift_build:
691 namespace: default
692 build_config_name: hello-world
693
694 # Starts build from a previous build "default/hello-world-1"
695 - name: Starts build from a previous build
696 community.okd.openshift_build:
697 namespace: default
698 build_name: hello-world-1
699
700 # Cancel the build with the given name
701 - name: Cancel build from default namespace
702 community.okd.openshift_build:
703 namespace: "default"
704 build_name: ruby-build-1
705 state: cancelled
706
707 # Cancel the named build and create a new one with the same parameters
708 - name: Cancel build from default namespace and create a new one
709 community.okd.openshift_build:
710 namespace: "default"
711 build_name: ruby-build-1
712 state: restarted
713
714 # Cancel all builds created from 'ruby-build' build configuration that are in 'new' state
715 - name: Cancel build from default namespace and create a new one
716 community.okd.openshift_build:
717 namespace: "default"
718 build_config_name: ruby-build
719 build_phases:
720 - New
721 state: cancelled
722
723
724
725 Return Values
726 -------------
727 Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
728
729 .. raw:: html
730
731 <table border=0 cellpadding=0 class="documentation-table">
732 <tr>
733 <th colspan="2">Key</th>
734 <th>Returned</th>
735 <th width="100%">Description</th>
736 </tr>
737 <tr>
738 <td colspan="2">
739 <div class="ansibleOptionAnchor" id="return-"></div>
740 <b>builds</b>
741 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
742 <div style="font-size: small">
743 <span style="color: purple">complex</span>
744 </div>
745 </td>
746 <td>success</td>
747 <td>
748 <div>The builds that were started/cancelled.</div>
749 <br/>
750 </td>
751 </tr>
752 <tr>
753 <td class="elbow-placeholder">&nbsp;</td>
754 <td colspan="1">
755 <div class="ansibleOptionAnchor" id="return-"></div>
756 <b>api_version</b>
757 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
758 <div style="font-size: small">
759 <span style="color: purple">string</span>
760 </div>
761 </td>
762 <td>success</td>
763 <td>
764 <div>The versioned schema of this representation of an object.</div>
765 <br/>
766 </td>
767 </tr>
768 <tr>
769 <td class="elbow-placeholder">&nbsp;</td>
770 <td colspan="1">
771 <div class="ansibleOptionAnchor" id="return-"></div>
772 <b>kind</b>
773 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
774 <div style="font-size: small">
775 <span style="color: purple">string</span>
776 </div>
777 </td>
778 <td>success</td>
779 <td>
780 <div>Represents the REST resource this object represents.</div>
781 <br/>
782 </td>
783 </tr>
784 <tr>
785 <td class="elbow-placeholder">&nbsp;</td>
786 <td colspan="1">
787 <div class="ansibleOptionAnchor" id="return-"></div>
788 <b>metadata</b>
789 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
790 <div style="font-size: small">
791 <span style="color: purple">dictionary</span>
792 </div>
793 </td>
794 <td>success</td>
795 <td>
796 <div>Standard object metadata. Includes name, namespace, annotations, labels, etc.</div>
797 <br/>
798 </td>
799 </tr>
800 <tr>
801 <td class="elbow-placeholder">&nbsp;</td>
802 <td colspan="1">
803 <div class="ansibleOptionAnchor" id="return-"></div>
804 <b>spec</b>
805 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
806 <div style="font-size: small">
807 <span style="color: purple">dictionary</span>
808 </div>
809 </td>
810 <td>success</td>
811 <td>
812 <div>Specific attributes of the build.</div>
813 <br/>
814 </td>
815 </tr>
816 <tr>
817 <td class="elbow-placeholder">&nbsp;</td>
818 <td colspan="1">
819 <div class="ansibleOptionAnchor" id="return-"></div>
820 <b>status</b>
821 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
822 <div style="font-size: small">
823 <span style="color: purple">dictionary</span>
824 </div>
825 </td>
826 <td>success</td>
827 <td>
828 <div>Current status details for the object.</div>
829 <br/>
830 </td>
831 </tr>
832
833 </table>
834 <br/><br/>
835
836
837 Status
838 ------
839
840
841 Authors
842 ~~~~~~~
843
844 - Aubin Bikouo (@abikouo)