2016-06-13 00:19:07 +08:00
|
|
|
- name: Install pip
|
|
|
|
action:
|
|
|
|
module: "{{ ansible_pkg_mgr }}"
|
|
|
|
name: "python-pip"
|
|
|
|
state: latest
|
|
|
|
when: ansible_os_family != "CoreOS" and kpm_packages | length > 0
|
|
|
|
|
2016-05-05 00:00:46 +08:00
|
|
|
- name: install kpm
|
2016-06-13 00:19:07 +08:00
|
|
|
pip:
|
|
|
|
name: "kpm"
|
|
|
|
state: "latest"
|
|
|
|
when: kpm_packages | length > 0
|
2016-05-05 00:00:46 +08:00
|
|
|
|
2016-05-02 23:07:03 +08:00
|
|
|
- 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)}}"
|
2016-05-04 23:46:29 +08:00
|
|
|
variables: "{{item.variables | default(omit)}}"
|
2016-05-02 23:07:03 +08:00
|
|
|
name: "{{item.name}}"
|
|
|
|
with_items: "{{kpm_packages}}"
|
|
|
|
register: kpmresults
|
2016-06-13 00:19:07 +08:00
|
|
|
environment:
|
|
|
|
PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}"
|