mirror of
https://github.com/lukaszraczylo/rpi-home-cluster-setup.git
synced 2026-10-20 01:37:07 +00:00
Bugfixes and enhacements (#1)
* Fix mounts issue after complete cluster shutdown. * Add pimoroni fan shim support.
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
- name: Install packages - fan support
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- git
|
||||||
|
- go
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: PiMoroni fan shim repo
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: 'https://github.com/lukaszraczylo/fanshim-go.git'
|
||||||
|
dest: /srv/pimoroni-fans
|
||||||
|
force: yes
|
||||||
|
|
||||||
|
- name: Install pimoroni fans
|
||||||
|
ansible.builtin.shell:
|
||||||
|
chdir: /srv/pimoroni-fans
|
||||||
|
cmd: |
|
||||||
|
go build -o /usr/bin/fans
|
||||||
|
creates: /usr/bin/fans
|
||||||
|
|
||||||
|
- name: Copy startup script
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: static/pi-fans
|
||||||
|
dest: /etc/init.d/fans
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0744'
|
||||||
|
backup: no
|
||||||
|
|
||||||
|
- name: Start and enable fans service
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: fans
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
- name: Pull basic images
|
- name: Pull basic images
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: kubeadm config images pull
|
cmd: kubeadm config images pull
|
||||||
|
creates: /etc/kubernetes/kubelet.conf
|
||||||
|
|
||||||
- name: Install helm
|
- name: Install helm
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
|
|||||||
@@ -7,3 +7,5 @@
|
|||||||
- include: networking.yml
|
- include: networking.yml
|
||||||
- include: kubernetes.yml
|
- include: kubernetes.yml
|
||||||
- include: nfs.yml
|
- include: nfs.yml
|
||||||
|
- include: fan-support.yml
|
||||||
|
when: settings.pimoroni_fans_enabled == "enabled"
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
fstype: nfs
|
fstype: nfs
|
||||||
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
||||||
state: mounted
|
state: mounted
|
||||||
|
boot: yes
|
||||||
|
|
||||||
- name: Mount NFS torrent
|
- name: Mount NFS torrent
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
fstype: nfs
|
fstype: nfs
|
||||||
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
||||||
state: mounted
|
state: mounted
|
||||||
|
boot: yes
|
||||||
|
|
||||||
- name: Mount NFS adguard
|
- name: Mount NFS adguard
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
@@ -32,3 +34,4 @@
|
|||||||
fstype: nfs
|
fstype: nfs
|
||||||
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
||||||
state: mounted
|
state: mounted
|
||||||
|
boot: yes
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
nfs_torrent_path: "/mnt/drobo-storage/docker-volumes/torrent"
|
nfs_torrent_path: "/mnt/drobo-storage/docker-volumes/torrent"
|
||||||
nfs_adguard_path: "/mnt/drobo-storage/docker-volumes/adguard"
|
nfs_adguard_path: "/mnt/drobo-storage/docker-volumes/adguard"
|
||||||
nfs_multi_share_path: "/mnt/drobo-storage/docker-volumes/nfs-share"
|
nfs_multi_share_path: "/mnt/drobo-storage/docker-volumes/nfs-share"
|
||||||
|
pimoroni_fans_enabled: "enabled"
|
||||||
roles:
|
roles:
|
||||||
- common
|
- common
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
name="fans $RC_SVCNAME"
|
||||||
|
command="/usr/bin/fans"
|
||||||
|
command_args="-brightness 5 --on-threshold 65 --off-threshold 50 -extended-colors"
|
||||||
|
command_user="root"
|
||||||
|
pidfile="/run/$RC_SVCNAME.pid"
|
||||||
|
command_background="yes"
|
||||||
Reference in New Issue
Block a user