forked from micado-scale/ansible-micado
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-micado-worker.yml
50 lines (41 loc) · 1.85 KB
/
build-micado-worker.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
39
40
41
42
43
44
45
46
47
48
49
50
---
- name: Build MiCADO worker
hosts: micado-target
gather_facts: False
pre_tasks:
- name: (System) Ensure that python3 installed
raw: bash -c "test -e /usr/bin/python3" || (apt -qqy update && apt install -qqy python3-minimal)
register: output
changed_when: not output.stdout
- name: (System) Turn back gather_fact
setup:
- name: (System) Check requirements
assert:
that:
"{{ item.that }}"
msg: >
"{{ item.msg }}"
loop:
- { that: "ansible_os_family == 'Debian' and ansible_distribution_version == '16.04' or ansible_distribution_version == '18.04'",
msg: 'The required OS is Ubuntu 16.04 or 18.04' }
- { that: "ansible_memtotal_mb >= 1950", msg: 'The minimum required memory size is 2 GB' }
- { that: "ansible_mounts | selectattr('mount','equalto', '/') | map(attribute='size_total') | list | first >= 7000000000",
msg: 'The minimum required disk size is 8 GB' }
- name: (System) Waiting for automatic security updates to finish
script: pre-task/wait-updates.sh
register: outputsh
changed_when: not outputsh.stdout
roles:
- micado-worker
vars:
##################################################################################
##### Please do not edit under this line unless you know what you are doing. #####
##################################################################################
- docker_images:
cadvisor: gcr.io/google-containers/cadvisor:v0.34.0
node_exporter: prom/node-exporter:v0.18.1
- packages:
docker_ce: "docker-ce=5:19.03.8~3-0~ubuntu-{{ ansible_distribution_release }}"
docker_ce_cli: "docker-ce-cli=5:19.03.8~3-0~ubuntu-{{ ansible_distribution_release }}"
containerd_io: containerd.io=1.2.13-1
kubernetes_version: 1.18.0-00