c12s-kubespray/roles/kubernetes-apps/kpm/tasks/main.yml
Bogdan Dobrelya dacfbde0b0 Rework inventory all by real groups' vars
* Leave all.yml to keep only optional vars
* Store groups' specific vars by existing group names
* Fix optional vars casted as mandatory (add default())
* Fix missing defaults for an optional IP var
* Relink group_vars for terraform to reflect changes

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
2017-02-23 09:43:42 +01:00

20 lines
656 B
YAML

---
- name: install kpm
pip:
name: "kpm"
state: "present"
version: "0.16.1"
when: kpm_packages|default([])| length > 0
- name: manage kubernetes applications
kpm:
namespace: "{{item.namespace | default(kpm_namespace | default('default'))}}"
registry: "{{item.registry | default(kpm_registry | default('https://api.kpm.sh'))}}"
state: "{{item.state | default(omit)}}"
version: "{{item.version | default(omit)}}"
variables: "{{item.variables | default(omit)}}"
name: "{{item.name}}"
with_items: "{{kpm_packages|default([])}}"
register: kpmresults
environment:
PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}"