-
Notifications
You must be signed in to change notification settings - Fork 0
/
packageinstall.yaml
89 lines (70 loc) · 2.08 KB
/
packageinstall.yaml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
- hosts: lambda
become: true
vars:
- kube_version: 1.16.3-00
tasks:
- name: Install required system packages
apt: name={{ item }} state=latest update_cache=yes
loop: [ 'apt-transport-https', 'ca-certificates', 'curl', 'software-properties-common', 'python3-pip', 'virtualenv', 'python3-setuptools']
tags:
- docker
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
tags:
- docker
- name: Add kube GPG apt Key
apt_key:
url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
state: present
tags:
- kube
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu bionic stable
state: present
tags:
- docker
- name: Add Kubernetes Repository
apt_repository:
repo: deb https://apt.kubernetes.io/ kubernetes-xenial main
state: present
tags:
- kube
- name: Update apt and install docker-ce and kubectl
apt: update_cache=yes name={{ item }} state=latest
loop: [ 'containerd.io', 'docker-ce', 'docker-ce-cli']
tags:
- docker
- name: Install kubectl
apt: update_cache=yes name=kubectl state=latest
tags:
- kube
- name: Install Docker Module for Python
pip:
name: docker
tags:
- docker
- name: Docker daemon config
copy:
src: configs/daemon.json
dest: /etc/docker/daemon.json
tags:
- docker
- docker-config
- name: Docker restart
service:
name: docker
state: restarted
tags:
- docker
- docker-config
#==========================================
- name: Install required packages
apt: name={{ item }} state=latest update_cache=yes
loop: [ "make", 'build-essential', 'libssl-dev', "zlib1g-dev", "libbz2-dev", \
"libreadline-dev", "libsqlite3-dev", "wget", "curl", "llvm", "libncurses5-dev", "libncursesw5-dev", \
"xz-utils", "tk-dev", "libffi-dev", "liblzma-dev", "python-openssl", "git", "graphviz", "emacs-nox", "htop"]
tags:
- packages