---
- name: Add Kubernetes GPG key
  apt_key:
    url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
    state: present

- name: Set up Kubernetes repository
  apt_repository:
    repo: 'deb http://apt.kubernetes.io/ kubernetes-xenial main'
    state: present

- name: Install kube CLIs
  package:
    name: "{{ item }}"
    state: present
    update_cache: yes
  with_items:
    - kubelet={{ k8s_version }}-00
    - kubectl={{ k8s_version }}-00
    - kubeadm={{ k8s_version }}-00
