community.kubernetes.helm – Manages Kubernetes packages with the Helm package manager¶
Note
This plugin is part of the community.kubernetes collection (version 1.1.1).
To install it use: ansible-galaxy collection install community.kubernetes
.
To use it in a playbook, specify: community.kubernetes.helm
.
New in version 0.11.0: of community.kubernetes
Synopsis¶
Install, upgrade, delete packages with the Helm package manager.
Note
This module has a corresponding action plugin.
Requirements¶
The below requirements are needed on the host that executes this module.
Parameters¶
Examples¶
- name: Deploy latest version of Prometheus chart inside monitoring namespace (and create it)
community.kubernetes.helm:
name: test
chart_ref: stable/prometheus
release_namespace: monitoring
create_namespace: true
# From repository
- name: Add stable chart repo
community.kubernetes.helm_repository:
name: stable
repo_url: "https://kubernetes-charts.storage.googleapis.com"
- name: Deploy latest version of Grafana chart inside monitoring namespace with values
community.kubernetes.helm:
name: test
chart_ref: stable/grafana
release_namespace: monitoring
values:
replicas: 2
- name: Deploy Grafana chart on 5.0.12 with values loaded from template
community.kubernetes.helm:
name: test
chart_ref: stable/grafana
chart_version: 5.0.12
values: "{{ lookup('template', 'somefile.yaml') | from_yaml }}"
- name: Deploy Grafana chart using values files on target
community.kubernetes.helm:
name: test
chart_ref: stable/grafana
release_namespace: monitoring
values_files:
- /path/to/values.yaml
- name: Remove test release and waiting suppression ending
community.kubernetes.helm:
name: test
state: absent
wait: true
# From git
- name: Git clone stable repo on HEAD
ansible.builtin.git:
repo: "http://github.com/helm/charts.git"
dest: /tmp/helm_repo
- name: Deploy Grafana chart from local path
community.kubernetes.helm:
name: test
chart_ref: /tmp/helm_repo/stable/grafana
release_namespace: monitoring
# From url
- name: Deploy Grafana chart on 5.0.12 from url
community.kubernetes.helm:
name: test
chart_ref: "https://kubernetes-charts.storage.googleapis.com/grafana-5.0.12.tgz"
release_namespace: monitoring
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Lucas Boisserie (@LucasBoisserie)
Matthieu Diehr (@d-matt)