-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.yml
61 lines (53 loc) · 1.3 KB
/
site.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
---
- hosts: k3s_cluster
gather_facts: yes
become: yes
vars:
log2ram_version: master
log2ram_size: 128M
pre_tasks:
- include: pre.yml
tags:
- pre
# Allowed to fail inorder to be idempotent
- name: Stop log2ram service
systemd:
name: log2ram
state: stopped
ignore_errors: true
- name: Cloning log2ram from GitHub
git:
repo: https://github.com/azlux/log2ram.git
dest: /opt/log2ram
version: "{{ log2ram_version }}"
- name: Changing perms of "/opt/log2ram/install.sh"
file:
dest: /opt/log2ram/install.sh
mode: a+x
- name: Install log2ram
command: /bin/sh ./install.sh
args:
chdir: "/opt/log2ram"
register: log2ram
changed_when: '"Reboot to activate log2ram" in log2ram.stdout'
- name: Copy log2ram.conf
template:
src: log2ram.conf.j2
dest: /etc/log2ram.conf
- name: create static route
copy:
dest: "/lib/dhcpcd/dhcpcd-hooks/40-route"
content: "ip route add 0.0.0.0/0 via {{ raspbian_gateway }}"
become: yes
roles:
- role: prereq
- role: download
- role: raspberrypi
- hosts: master
become: yes
roles:
- role: k3s/master
- hosts: node
become: yes
roles:
- role: k3s/node