Debian Codegraph @

ansible_collections/kubernetes/core/docs/kubernetes.core.helm_pull_module.rst

raw
1 .. _kubernetes.core.helm_pull_module:
2
3
4 *************************
5 kubernetes.core.helm_pull
6 *************************
7
8 **download a chart from a repository and (optionally) unpack it in local directory.**
9
10
11 Version added: 2.4.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - Retrieve a package from a package repository, and download it locally.
21 - It can also be used to perform cryptographic verification of a chart without installing the chart.
22 - There are options for unpacking the chart after download.
23
24
25
26 Requirements
27 ------------
28 The below requirements are needed on the host that executes this module.
29
30 - helm >= 3.0.0 (https://github.com/helm/helm/releases)
31
32
33 Parameters
34 ----------
35
36 .. raw:: html
37
38 <table border=0 cellpadding=0 class="documentation-table">
39 <tr>
40 <th colspan="1">Parameter</th>
41 <th>Choices/<font color="blue">Defaults</font></th>
42 <th width="100%">Comments</th>
43 </tr>
44 <tr>
45 <td colspan="1">
46 <div class="ansibleOptionAnchor" id="parameter-"></div>
47 <b>binary_path</b>
48 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
49 <div style="font-size: small">
50 <span style="color: purple">path</span>
51 </div>
52 </td>
53 <td>
54 </td>
55 <td>
56 <div>The path of a helm binary to use.</div>
57 </td>
58 </tr>
59 <tr>
60 <td colspan="1">
61 <div class="ansibleOptionAnchor" id="parameter-"></div>
62 <b>chart_ca_cert</b>
63 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
64 <div style="font-size: small">
65 <span style="color: purple">path</span>
66 </div>
67 </td>
68 <td>
69 </td>
70 <td>
71 <div>Verify certificates of HTTPS-enabled servers using this CA bundle.</div>
72 <div>Requires helm &gt;= 3.1.0.</div>
73 </td>
74 </tr>
75 <tr>
76 <td colspan="1">
77 <div class="ansibleOptionAnchor" id="parameter-"></div>
78 <b>chart_devel</b>
79 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
80 <div style="font-size: small">
81 <span style="color: purple">boolean</span>
82 </div>
83 </td>
84 <td>
85 <ul style="margin: 0; padding: 0"><b>Choices:</b>
86 <li>no</li>
87 <li>yes</li>
88 </ul>
89 </td>
90 <td>
91 <div>Use development versions, too. Equivalent to version &#x27;&gt;0.0.0-0&#x27;.</div>
92 <div>Mutually exclusive with <code>chart_version</code>.</div>
93 </td>
94 </tr>
95 <tr>
96 <td colspan="1">
97 <div class="ansibleOptionAnchor" id="parameter-"></div>
98 <b>chart_ref</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>chart name on chart repository.</div>
109 <div>absolute URL.</div>
110 </td>
111 </tr>
112 <tr>
113 <td colspan="1">
114 <div class="ansibleOptionAnchor" id="parameter-"></div>
115 <b>chart_ssl_cert_file</b>
116 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
117 <div style="font-size: small">
118 <span style="color: purple">path</span>
119 </div>
120 </td>
121 <td>
122 </td>
123 <td>
124 <div>Identify HTTPS client using this SSL certificate file.</div>
125 <div>Requires helm &gt;= 3.1.0.</div>
126 </td>
127 </tr>
128 <tr>
129 <td colspan="1">
130 <div class="ansibleOptionAnchor" id="parameter-"></div>
131 <b>chart_ssl_key_file</b>
132 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
133 <div style="font-size: small">
134 <span style="color: purple">path</span>
135 </div>
136 </td>
137 <td>
138 </td>
139 <td>
140 <div>Identify HTTPS client using this SSL key file</div>
141 <div>Requires helm &gt;= 3.1.0.</div>
142 </td>
143 </tr>
144 <tr>
145 <td colspan="1">
146 <div class="ansibleOptionAnchor" id="parameter-"></div>
147 <b>chart_version</b>
148 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
149 <div style="font-size: small">
150 <span style="color: purple">string</span>
151 </div>
152 </td>
153 <td>
154 </td>
155 <td>
156 <div>Specify a version constraint for the chart version to use.</div>
157 <div>This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0).</div>
158 <div>Mutually exclusive with <code>chart_devel</code>.</div>
159 </td>
160 </tr>
161 <tr>
162 <td colspan="1">
163 <div class="ansibleOptionAnchor" id="parameter-"></div>
164 <b>destination</b>
165 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
166 <div style="font-size: small">
167 <span style="color: purple">path</span>
168 / <span style="color: red">required</span>
169 </div>
170 </td>
171 <td>
172 </td>
173 <td>
174 <div>location to write the chart.</div>
175 </td>
176 </tr>
177 <tr>
178 <td colspan="1">
179 <div class="ansibleOptionAnchor" id="parameter-"></div>
180 <b>force</b>
181 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
182 <div style="font-size: small">
183 <span style="color: purple">boolean</span>
184 </div>
185 <div style="font-style: italic; font-size: small; color: darkgreen">added in 6.3.0</div>
186 </td>
187 <td>
188 <ul style="margin: 0; padding: 0"><b>Choices:</b>
189 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
190 <li>yes</li>
191 </ul>
192 </td>
193 <td>
194 <div>Force download of the chart even if it already exists in the destination directory.</div>
195 <div>By default, the module will skip downloading if the chart with the same version already exists for idempotency.</div>
196 <div>When used with O(untar_chart=true), will remove any existing chart directory before extracting.</div>
197 </td>
198 </tr>
199 <tr>
200 <td colspan="1">
201 <div class="ansibleOptionAnchor" id="parameter-"></div>
202 <b>pass_credentials</b>
203 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
204 <div style="font-size: small">
205 <span style="color: purple">boolean</span>
206 </div>
207 </td>
208 <td>
209 <ul style="margin: 0; padding: 0"><b>Choices:</b>
210 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
211 <li>yes</li>
212 </ul>
213 </td>
214 <td>
215 <div>Pass credentials to all domains.</div>
216 </td>
217 </tr>
218 <tr>
219 <td colspan="1">
220 <div class="ansibleOptionAnchor" id="parameter-"></div>
221 <b>plain_http</b>
222 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
223 <div style="font-size: small">
224 <span style="color: purple">boolean</span>
225 </div>
226 <div style="font-style: italic; font-size: small; color: darkgreen">added in 6.1.0</div>
227 </td>
228 <td>
229 <ul style="margin: 0; padding: 0"><b>Choices:</b>
230 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
231 <li>yes</li>
232 </ul>
233 </td>
234 <td>
235 <div>Use HTTP instead of HTTPS when working with OCI registries</div>
236 <div>Requires Helm &gt;= 3.13.0</div>
237 </td>
238 </tr>
239 <tr>
240 <td colspan="1">
241 <div class="ansibleOptionAnchor" id="parameter-"></div>
242 <b>provenance</b>
243 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
244 <div style="font-size: small">
245 <span style="color: purple">boolean</span>
246 </div>
247 </td>
248 <td>
249 <ul style="margin: 0; padding: 0"><b>Choices:</b>
250 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
251 <li>yes</li>
252 </ul>
253 </td>
254 <td>
255 <div>Fetch the provenance file, but don&#x27;t perform verification.</div>
256 </td>
257 </tr>
258 <tr>
259 <td colspan="1">
260 <div class="ansibleOptionAnchor" id="parameter-"></div>
261 <b>repo_password</b>
262 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
263 <div style="font-size: small">
264 <span style="color: purple">string</span>
265 </div>
266 </td>
267 <td>
268 </td>
269 <td>
270 <div>Chart repository password where to locate the requested chart.</div>
271 <div>Required if <code>repo_username</code> is specified.</div>
272 <div style="font-size: small; color: darkgreen"><br/>aliases: password, chart_repo_password</div>
273 </td>
274 </tr>
275 <tr>
276 <td colspan="1">
277 <div class="ansibleOptionAnchor" id="parameter-"></div>
278 <b>repo_url</b>
279 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
280 <div style="font-size: small">
281 <span style="color: purple">string</span>
282 </div>
283 </td>
284 <td>
285 </td>
286 <td>
287 <div>chart repository url where to locate the requested chart.</div>
288 <div style="font-size: small; color: darkgreen"><br/>aliases: url, chart_repo_url</div>
289 </td>
290 </tr>
291 <tr>
292 <td colspan="1">
293 <div class="ansibleOptionAnchor" id="parameter-"></div>
294 <b>repo_username</b>
295 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
296 <div style="font-size: small">
297 <span style="color: purple">string</span>
298 </div>
299 </td>
300 <td>
301 </td>
302 <td>
303 <div>Chart repository username where to locate the requested chart.</div>
304 <div>Required if <code>repo_password</code> is specified.</div>
305 <div style="font-size: small; color: darkgreen"><br/>aliases: username, chart_repo_username</div>
306 </td>
307 </tr>
308 <tr>
309 <td colspan="1">
310 <div class="ansibleOptionAnchor" id="parameter-"></div>
311 <b>skip_tls_certs_check</b>
312 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
313 <div style="font-size: small">
314 <span style="color: purple">boolean</span>
315 </div>
316 </td>
317 <td>
318 <ul style="margin: 0; padding: 0"><b>Choices:</b>
319 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
320 <li>yes</li>
321 </ul>
322 </td>
323 <td>
324 <div>Whether or not to check tls certificate for the chart download.</div>
325 <div>Requires helm &gt;= 3.3.0. Alias <code>insecure_skip_tls_verify</code> added in 5.3.0.</div>
326 <div style="font-size: small; color: darkgreen"><br/>aliases: insecure_skip_tls_verify</div>
327 </td>
328 </tr>
329 <tr>
330 <td colspan="1">
331 <div class="ansibleOptionAnchor" id="parameter-"></div>
332 <b>untar_chart</b>
333 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
334 <div style="font-size: small">
335 <span style="color: purple">boolean</span>
336 </div>
337 </td>
338 <td>
339 <ul style="margin: 0; padding: 0"><b>Choices:</b>
340 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
341 <li>yes</li>
342 </ul>
343 </td>
344 <td>
345 <div>if set to true, will untar the chart after downloading it.</div>
346 </td>
347 </tr>
348 <tr>
349 <td colspan="1">
350 <div class="ansibleOptionAnchor" id="parameter-"></div>
351 <b>verify_chart</b>
352 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
353 <div style="font-size: small">
354 <span style="color: purple">boolean</span>
355 </div>
356 </td>
357 <td>
358 <ul style="margin: 0; padding: 0"><b>Choices:</b>
359 <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
360 <li>yes</li>
361 </ul>
362 </td>
363 <td>
364 <div>Verify the package before using it.</div>
365 </td>
366 </tr>
367 <tr>
368 <td colspan="1">
369 <div class="ansibleOptionAnchor" id="parameter-"></div>
370 <b>verify_chart_keyring</b>
371 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
372 <div style="font-size: small">
373 <span style="color: purple">path</span>
374 </div>
375 </td>
376 <td>
377 </td>
378 <td>
379 <div>location of public keys used for verification.</div>
380 </td>
381 </tr>
382 </table>
383 <br/>
384
385
386
387
388 Examples
389 --------
390
391 .. code-block:: yaml
392
393 - name: Download chart using chart url
394 kubernetes.core.helm_pull:
395 chart_ref: https://github.com/grafana/helm-charts/releases/download/grafana-5.6.0/grafana-5.6.0.tgz
396 destination: /path/to/chart
397
398 - name: Download Chart using chart_name and repo_url
399 kubernetes.core.helm_pull:
400 chart_ref: redis
401 repo_url: https://charts.bitnami.com/bitnami
402 untar_chart: yes
403 destination: /path/to/chart
404
405 - name: Download Chart (skip tls certificate check)
406 kubernetes.core.helm_pull:
407 chart_ref: redis
408 repo_url: https://charts.bitnami.com/bitnami
409 untar_chart: yes
410 destination: /path/to/chart
411 skip_tls_certs_check: yes
412
413 - name: Download Chart using chart registry credentials
414 kubernetes.core.helm_pull:
415 chart_ref: redis
416 repo_url: https://charts.bitnami.com/bitnami
417 untar_chart: yes
418 destination: /path/to/chart
419 username: myuser
420 password: mypassword123
421
422 - name: Download Chart (force re-download even if exists)
423 kubernetes.core.helm_pull:
424 chart_ref: redis
425 repo_url: https://charts.bitnami.com/bitnami
426 chart_version: '17.0.0'
427 destination: /path/to/chart
428 force: yes
429
430 - name: Download and untar chart (force re-extraction even if directory exists)
431 kubernetes.core.helm_pull:
432 chart_ref: redis
433 repo_url: https://charts.bitnami.com/bitnami
434 chart_version: '17.0.0'
435 destination: /path/to/chart
436 untar_chart: yes
437 force: yes
438
439
440
441 Return Values
442 -------------
443 Common return values are documented `here <https://docs.ansible.com/projects/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
444
445 .. raw:: html
446
447 <table border=0 cellpadding=0 class="documentation-table">
448 <tr>
449 <th colspan="1">Key</th>
450 <th>Returned</th>
451 <th width="100%">Description</th>
452 </tr>
453 <tr>
454 <td colspan="1">
455 <div class="ansibleOptionAnchor" id="return-"></div>
456 <b>command</b>
457 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
458 <div style="font-size: small">
459 <span style="color: purple">string</span>
460 </div>
461 </td>
462 <td>always</td>
463 <td>
464 <div>Full `helm pull` command built by this module, in case you want to re-run the command outside the module or debug a problem.</div>
465 <br/>
466 <div style="font-size: smaller"><b>Sample:</b></div>
467 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">helm pull --repo test ...</div>
468 </td>
469 </tr>
470 <tr>
471 <td colspan="1">
472 <div class="ansibleOptionAnchor" id="return-"></div>
473 <b>msg</b>
474 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
475 <div style="font-size: small">
476 <span style="color: purple">string</span>
477 </div>
478 </td>
479 <td>when chart already exists</td>
480 <td>
481 <div>A message indicating the result of the operation.</div>
482 <br/>
483 <div style="font-size: smaller"><b>Sample:</b></div>
484 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">Chart redis version 17.0.0 already exists in destination directory</div>
485 </td>
486 </tr>
487 <tr>
488 <td colspan="1">
489 <div class="ansibleOptionAnchor" id="return-"></div>
490 <b>rc</b>
491 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
492 <div style="font-size: small">
493 <span style="color: purple">integer</span>
494 </div>
495 </td>
496 <td>always</td>
497 <td>
498 <div>Helm pull command return code</div>
499 <br/>
500 <div style="font-size: smaller"><b>Sample:</b></div>
501 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">1</div>
502 </td>
503 </tr>
504 <tr>
505 <td colspan="1">
506 <div class="ansibleOptionAnchor" id="return-"></div>
507 <b>stderr</b>
508 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
509 <div style="font-size: small">
510 <span style="color: purple">string</span>
511 </div>
512 </td>
513 <td>always</td>
514 <td>
515 <div>Full `helm pull` command stderr, in case you want to display it or examine the event log</div>
516 <br/>
517 </td>
518 </tr>
519 <tr>
520 <td colspan="1">
521 <div class="ansibleOptionAnchor" id="return-"></div>
522 <b>stdout</b>
523 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
524 <div style="font-size: small">
525 <span style="color: purple">string</span>
526 </div>
527 </td>
528 <td>always</td>
529 <td>
530 <div>Full `helm pull` command stdout, in case you want to display it or examine the event log</div>
531 <br/>
532 </td>
533 </tr>
534 </table>
535 <br/><br/>
536
537
538 Status
539 ------
540
541
542 Authors
543 ~~~~~~~
544
545 - Aubin Bikouo (@abikouo)