Skip to content

Instantly share code, notes, and snippets.

@jpclipffel
Created July 21, 2020 09:21
Show Gist options
  • Save jpclipffel/1972397bdfa4456ddbd95093b3cad199 to your computer and use it in GitHub Desktop.
Save jpclipffel/1972397bdfa4456ddbd95093b3cad199 to your computer and use it in GitHub Desktop.
Manage Helm with Ansible

Ansible - Helm management

Get releases list

- name: Get all Helm releases
  shell: >
    helm list -o yaml
  register: _helm_releases

Search release by name

- name: Get Helm release
  set_fact:
    my_release: "{{ (_helm_releases.stdout | from_yaml | selectattr('name', 'equalto', 'releaseName') | list)[0] | default({}) }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment