diff --git a/roles/kubernetes-apps/tasks/main.yaml b/roles/kubernetes-apps/tasks/main.yaml index 315c880ef..c30a73d24 100644 --- a/roles/kubernetes-apps/tasks/main.yaml +++ b/roles/kubernetes-apps/tasks/main.yaml @@ -1,5 +1,15 @@ +- name: Install pip + action: + module: "{{ ansible_pkg_mgr }}" + name: "python-pip" + state: latest + when: ansible_os_family != "CoreOS" and kpm_packages | length > 0 + - name: install kpm - pip: name=kpm state=latest + pip: + name: "kpm" + state: "latest" + when: kpm_packages | length > 0 - name: manage kubernetes applications kpm: @@ -11,3 +21,5 @@ name: "{{item.name}}" with_items: "{{kpm_packages}}" register: kpmresults + environment: + PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}" diff --git a/roles/kubernetes/preinstall/defaults/main.yml b/roles/kubernetes/preinstall/defaults/main.yml index 376663519..49f9b7c0e 100644 --- a/roles/kubernetes/preinstall/defaults/main.yml +++ b/roles/kubernetes/preinstall/defaults/main.yml @@ -2,7 +2,6 @@ run_gitinfos: false common_required_pkgs: - - python-pip - python-httplib2 - openssl - curl diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 08998e695..95cd134ce 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -106,8 +106,4 @@ mode: 0640 when: cloud_provider is defined and cloud_provider == "openstack" -- name: Install kpm - pip: - name: "kpm" - - include: etchosts.yml