mirror of
https://github.com/lukaszraczylo/rpi-home-cluster-setup.git
synced 2026-10-14 00:58:38 +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
|
||||
ansible.builtin.shell:
|
||||
cmd: kubeadm config images pull
|
||||
creates: /etc/kubernetes/kubelet.conf
|
||||
|
||||
- name: Install helm
|
||||
ansible.builtin.shell:
|
||||
|
||||
@@ -6,4 +6,6 @@
|
||||
when: basic_config_lock.stat.exists == False
|
||||
- include: networking.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
|
||||
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
||||
state: mounted
|
||||
boot: yes
|
||||
|
||||
- name: Mount NFS torrent
|
||||
ansible.posix.mount:
|
||||
@@ -24,6 +25,7 @@
|
||||
fstype: nfs
|
||||
opts: nofail,noatime,nolock,tcp,actimeo=1800
|
||||
state: mounted
|
||||
boot: yes
|
||||
|
||||
- name: Mount NFS adguard
|
||||
ansible.posix.mount:
|
||||
@@ -31,4 +33,5 @@
|
||||
path: /mnt/drobo-storage/docker-volumes/adguard
|
||||
fstype: nfs
|
||||
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_adguard_path: "/mnt/drobo-storage/docker-volumes/adguard"
|
||||
nfs_multi_share_path: "/mnt/drobo-storage/docker-volumes/nfs-share"
|
||||
pimoroni_fans_enabled: "enabled"
|
||||
roles:
|
||||
- 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