blob: 76af5be7fd0b477b337e1c91582dc1da020f58e3 (
plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
---
# file: roles/tg_sut/tasks/ubuntu_x86_64.yaml
- name: Install python-dev
apt:
name: 'python-dev'
state: 'present'
update_cache: True
tags: install-python-dev
- name: Install python-virtualenv
apt:
name: 'python-virtualenv'
state: 'present'
update_cache: True
tags: install-python-virtualenv
- name: Install python pip
apt:
name: 'python-pip'
state: 'present'
update_cache: True
tags: install-python-pip
- name: Install libpcap-dev
apt:
name: 'libpcap-dev'
state: 'present'
update_cache: True
tags: install-libpcap-dev
- name: Install cpufrequtils
apt:
name: 'cpufrequtils'
state: 'present'
update_cache: True
tags: install-cpufrequtils
- name: Install cgroup-support
apt:
name: 'cgroup-bin'
state: 'present'
update_cache: True
tags: install-cgroup-support
- name: Install zlib1g-dev
apt:
name: 'zlib1g-dev'
state: 'present'
update_cache: True
tags: install-zlib1g-dev
- name: Install libnuma-dev
apt:
name: 'libnuma-dev'
state: 'present'
update_cache: True
tags: install-libnuma-dev
- name: Install Docker and role dependencies
apt:
name: "{{ item }}"
state: "present"
install_recommends: False
with_items:
- "apt-transport-https"
- "ca-certificates"
- "software-properties-common"
- "cron"
tags: install-docker
- name: Install upstream APT GPG key
apt_key:
id: "{{ docker_apt_key }}"
keyserver: "{{ ansible_local.core.keyserver
if (ansible_local|d() and ansible_local.core|d() and
ansible_local.core.keyserver)
else 'hkp://pool.sks-keyservers.net' }}"
state: "present"
tags: install-docker
- name: Install upstream APT repository
apt_repository:
repo: "{{ docker_repository }}"
state: "present"
update_cache: True
tags: install-docker
- name: Install Docker
apt:
name: "docker-{{ docker_edition }}={{ docker_apt_package_name }}"
state: "present"
update_cache: True
install_recommends: False
cache_valid_time: "{{ apt_cache_time }}"
tags: install-docker
- name: Remove Upstart config file
file:
path: "/etc/default/docker"
state: "absent"
tags: docker
- name: Ensure systemd directory exists
file:
path: "/etc/systemd/system"
state: "directory"
owner: "root"
group: "root"
mode: "0755"
tags: ensure-docker
- name: Copy systemd unit file
template:
src: "templates/docker.service.j2"
dest: "/etc/systemd/system/docker.service"
owner: "root"
group: "root"
mode: "0644"
register: docker_register_systemd_service
tags: copy-docker
- name: Reload systemd daemon
command: "systemctl daemon-reload"
notify: ["Restart Docker"]
when: (docker_register_systemd_service and
docker_register_systemd_service is changed)
tags: restart-docker
- name: Set specific users to "docker" group
user:
name: "{{ item }}"
groups: "docker"
append: True
with_items: "{{ docker_users }}"
when: docker_users
tags: set-docker
- name: Install upstream APT GPG key
apt_key:
id: "{{ kubernetes_apt_key }}"
keyserver: "{{ ansible_local.core.keyserver
if (ansible_local|d() and ansible_local.core|d() and
ansible_local.core.keyserver)
else 'hkp://pool.sks-keyservers.net' }}"
state: "present"
tags: install-kubernetes
- name: Install upstream APT repository
apt_repository:
repo: "{{ kubernetes_repository }}"
state: "present"
update_cache: True
tags: install-kubernetes
- name: Install kubeadm
apt:
name: "kubeadm={{ kubernetes_apt_package_name }}"
state: "present"
force: yes
update_cache: True
install_recommends: False
cache_valid_time: "{{ apt_cache_time }}"
tags: install-kubernetes
- name: Install kubectl
apt:
name: "kubectl={{ kubernetes_apt_package_name }}"
state: "present"
force: yes
update_cache: True
install_recommends: False
cache_valid_time: "{{ apt_cache_time }}"
tags: install-kubernetes
- name: Install kubelet
apt:
name: "kubelet={{ kubernetes_apt_package_name }}"
state: "present"
force: yes
update_cache: True
install_recommends: False
cache_valid_time: "{{ apt_cache_time }}"
tags: install-kubernetes
- name: Apply kubelet parameter
lineinfile:
path: '/etc/default/kubelet'
state: 'present'
regexp: '^KUBELET_EXTRA_ARGS=*'
line: 'KUBELET_EXTRA_ARGS=--feature-gates HugePages=false'
tags: install-kubernetes
|