-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
95 lines (74 loc) · 2.41 KB
/
main.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
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
---
- hosts: geexar
become: true
vars_files:
- vars/main.yml
- config.yml
pre_tasks:
- import_tasks: tasks/test-setup.yml
when: deploy_target != 'pi'
tags: ["always"]
- name: Ensure dependencies are installed.
apt:
name:
- sudo
- openssh-server
state: present
# # To fix to incompatible with images based on Ubuntu
# # https://github.com/causefx/Organizr/issues/1058
# # https://docs.linuxserver.io/faq#libseccomp
# - name: Download libseccomp2_2 file to tmp dir
# get_url:
# url: http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.3.3-4_armhf.deb
# dest: /tmp/libseccomp_armhf.deb
# register: download
# - name: Install libseccomp2_2
# command: dpkg -i /tmp/libseccomp_armhf.deb
# when: download.changed
# - name: Remove the libseccomp2_2
# file:
# path: /tmp/libseccomp_armhf.deb
# state: absent
- import_tasks: tasks/cgroup-features.yml
- import_tasks: tasks/disable-swap.yml
tags: ["always"]
- import_tasks: tasks/net-setup.yml
when:
- ansible_distribution_version == "11"
- deploy_target != 'docker'
- name: Set the master node IP.
set_fact:
kubernetes_master_ip: "{{ hostvars['kube1']['ansible_host'] }}"
tags: ["always"]
roles:
- role: geerlingguy.security
tags: ["security"]
- role: geerlingguy.swap
tags: ["always", "swap"]
when: deploy_target == 'vagrant'
- role: geerlingguy.nfs
tags: ["nfs"]
delegate_to: "{{ groups.geexar[0] }}"
run_once: true
- role: geerlingguy.pip
tags: ["pip", "docker"]
# - role: geerlingguy.docker_arm
# tags: ["docker"]
- role: geerlingguy.containerd
tags: ["containerd"]
- role: geerlingguy.kubernetes
tags: ["kubernetes"]
tasks:
- include_tasks: tasks/nfs.yml
tags: ["nfs"]
- import_tasks: tasks/k8s-registry-setup.yml
tags: ["kubernetes"]
- import_tasks: tasks/k8s-services.yml
tags: ["kubernetes", "services"]
- import_tasks: tasks/k8s-config.yml
tags: ["kubernetes"]
- import_role:
name: geerlingguy.k8s_manifests
tags: ["kubernetes", "manifests"]
delegate_to: "{{ groups.geexar[0] }}"
run_once: true