community.kubernetes.helm_template – Render chart templates
Note
This plugin is part of the community.kubernetes collection (version 1.2.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.kubernetes
.
To use it in a playbook, specify: community.kubernetes.helm_template
.
Parameters
Parameter |
Comments |
---|---|
The path of a helm binary to use. |
|
Chart reference with repo prefix, for example, Path to a packaged chart. Path to an unpacked chart directory. Absolute URL. |
|
Chart repository URL where the requested chart is located. |
|
Chart version to use. If this is not specified, the latest version is installed. |
|
Include custom resource descriptions in rendered templates. Choices:
|
|
Output directory where templates will be written. If the directory already exists, it will be overwritten. |
|
Values to pass to chart. Default: {} |
|
Run Choices:
|
|
Value files to pass to chart. Paths will be read from the target host’s filesystem, not the host running ansible. values_files option is evaluated before values option if both are used. Paths are evaluated in the order the paths are specified. Default: [] |
Examples
- name: Render templates to specified directory
community.kubernetes.helm_template:
chart_ref: stable/prometheus
output_dir: mycharts
- name: Render templates
community.kubernetes.helm_template:
chart_ref: stable/prometheus
register: result
- name: Write templates to file
copy:
dest: myfile.yaml
content: "{{ result.stdout }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Full Returned: always Sample: “helm template –output-dir mychart nginx-stable/nginx-ingress” |
|
Full Returned: always Sample: “” |
|
Full Returned: always Sample: “” |
Authors
Mike Graves (@gravesm)