Skip to content

Commit

Permalink
metal: update k3s cluster and cleanup ansible code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Feb 25, 2022
1 parent bb386b8 commit a759d9d
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 155 deletions.
5 changes: 0 additions & 5 deletions metal/01_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,3 @@
any_errors_fatal: true
roles:
- paulfantom.raspberry

- hosts: fancontroler
become: true
roles:
- fans
3 changes: 1 addition & 2 deletions metal/group_vars/k3s.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
k3s_version: v1.22.3+k3s1
k3s_version: v1.23.4+k3s1
k3s_master_ip: "{{ hostvars[groups['k3s-master'][0]]['ansible_default_ipv4']['address'] }}"
k3s_extra_server_args: >-
--disable servicelb
--disable traefik
--disable local-storage
--disable-cloud-controller
--node-taint node-role.kubernetes.io/control-plane=true:NoSchedule
--kubelet-arg system-reserved=cpu=100m,memory=200Mi
--kubelet-arg kube-reserved=cpu=100m,memory=300Mi
--kube-controller-manager-arg address={{ k3s_master_ip }}
Expand Down
3 changes: 0 additions & 3 deletions metal/inventory
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ node02 ansible_user=ubuntu ansible_host=192.168.2.32 network=fast k3s_local_st
#node04 ansible_user=ubuntu ansible_host=192.168.2.34
metal01 ansible_user=ubuntu ansible_host=192.168.2.40 network=fast k3s_local_storage_device=/dev/ubuntu-vg/k3s-local-storage enable_smartmon=true

[fancontroler]
master01

[raspberry]
master01
node0[1:2]
Expand Down
96 changes: 0 additions & 96 deletions metal/roles/fans/files/fan.py

This file was deleted.

13 changes: 0 additions & 13 deletions metal/roles/fans/files/fan.service

This file was deleted.

7 changes: 0 additions & 7 deletions metal/roles/fans/handlers/main.yml

This file was deleted.

16 changes: 0 additions & 16 deletions metal/roles/fans/tasks/main.yml

This file was deleted.

2 changes: 1 addition & 1 deletion metal/roles/k3s-download/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
k3s_version: "v1.17.4+k3s1"
k3s_version: "v1.23.4+k3s1"
4 changes: 3 additions & 1 deletion metal/roles/k3s-download/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
- name: Check current k3s version
command: /usr/local/bin/k3s --version
register: _k3s_local_version_string
check_mode: no
when: _k3s_binary.stat.exists

- name: Extract current version
set_fact:
_k3s_local_version: "{{ _k3s_local_version_string.stdout.split(' ')[2] }}"
when: _k3s_binary.stat.exists
check_mode: no
when: _k3s_binary.stat.exists and (_k3s_local_version_string is defined)

- name: Download k3s binary
get_url:
Expand Down
7 changes: 7 additions & 0 deletions metal/roles/k3s-node/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: restart k3s
systemd:
name: k3s
daemon_reload: yes
state: restarted
enabled: yes
8 changes: 1 addition & 7 deletions metal/roles/k3s-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@
owner: root
group: root
mode: 0755

- name: Enable and check K3s service
systemd:
name: k3s-node
daemon_reload: yes
state: restarted
enabled: yes
notify: restart k3s
4 changes: 0 additions & 4 deletions metal/roles/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---
- name: cloudalchemy.node_exporter
- name: cloudalchemy.systemd_exporter
- name: oefenweb.locales
version: v1.0.49
- name: jnv.unattended-upgrades
version: v1.12.1
- name: dev-sec.ssh-hardening
#- name: geerlingguy.nfs # conflicts with current ZFS setup
- name: paulfantom.raspberry
#- name: bertvv.samba
# version: v2.7.1

0 comments on commit a759d9d

Please sign in to comment.