ReSearchITEng / kubeadm-playbook

Fully fledged (HA) Kubernetes Cluster using official kubeadm, ansible and helm. Tested on RHEL/CentOS/Ubuntu with support of http_proxy, dashboard installed, ingress controller, heapster - using official helm charts
https://researchiteng.github.io/kubeadm-playbook/
The Unlicense
592 stars 102 forks source link

any state "Installed" Package Installation doesnt work on Ubuntu #82

Closed gallexme closed 4 years ago

gallexme commented 4 years ago

Example:

- name: Install kubectl # ansible bug 29705
  package: name="{{ item }}={{kubectl_version | regex_replace('v')}}*" state=installed
  #environment: '{{ proxy_env | default ({}) }}'
  with_items:
  - kubectl
  when: kubectl_version is defined and ( kubectl_version!='installed' or kubectl_version!='latest' ) and ansible_os_family == "Debian"

state=installed doesnt exist in apt

(item=kubelet) => {"ansible_loop_var": "item", "changed": false, "item": "kubelet", "msg": "value of state must be one of: absent, build-dep, fixed, latest, present, got: installed"}

either change to latest/fixed/present

ReSearchITEng commented 4 years ago

I am using it in ubuntu for long... Never had such issue. Can you share the ubuntu version and ansible versions? It was tested with many ansible versions, from 2.3/4 till 2.7.5, also on latest ubuntu 18.04...

gallexme commented 4 years ago

Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic

Ansible 2.9

ReSearchITEng commented 4 years ago

so newer ansible... updating to "present" instead...

gallexme commented 4 years ago

Quick Headsup dont see it in https://docs.ansible.com/ansible/2.5/modules/apt_module.html?highlight=apt either but in the yum module https://docs.ansible.com/ansible/2.5/modules/yum_module.html weird :(

ReSearchITEng commented 4 years ago

somehow, it works in ubuntu. right now I am using ans 2.7.5 :) anyway, updated and closing it.