-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathk8s-common.yml
38 lines (35 loc) · 935 Bytes
/
k8s-common.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- name: Install K8S common services
hosts: all
tasks:
- name: K8S | Install K8S | Install apt-transport-https
apt:
name: apt-transport-https
update_cache: yes
state: present
become: true
become_method: sudo
- name: K8S | Install K8S | Add K8S Repo
apt_key:
url: "https://packages.cloud.google.com/apt/doc/apt-key.gpg"
state: present
become: true
become_method: sudo
- name: K8S | Install K8S | APT Repo
apt_repository:
repo: 'deb http://apt.kubernetes.io/ kubernetes-xenial main'
state: present
become: true
become_method: sudo
- name: K8S | Install K8S | Install Kubernetes
apt:
name: "{{ packages }}"
update_cache: yes
state: present
become: true
become_method: sudo
vars:
packages:
- kubelet
- kubeadm
- kubectl