Verified Commit 15ebc8de authored by Pierre-Louis Bonicoli's avatar Pierre-Louis Bonicoli 🏗
Browse files

Install kubectl in order to use Ansible kubectl connection plugin

parent 39d08e8c
......@@ -53,3 +53,26 @@
selector:
app: '{{ item.pod|default(item.name) }}'
loop: '{{ pods }}'
- vars:
# use system python in order to be able to use apt python module
ansible_python_interpreter: /usr/bin/python3
block:
- name: Add apt keys
apt_key:
url: 'https://packages.cloud.google.com/apt/doc/apt-key.gpg'
register: apt_keys_res
until: apt_keys_res is success
- name: Add apt repositories
apt_repository:
repo: 'deb https://apt.kubernetes.io/ kubernetes-xenial main'
register: apt_repository_res
until: apt_repository_res is success
- name: Install kubectl Debian package
apt:
name: kubectl
cache_valid_time: 86400
register: apt_install_kubectl_res
until: apt_install_kubectl_res is success
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment