Bugfixes and enhacements (#1)

* Fix mounts issue after complete cluster shutdown.

* Add pimoroni fan shim support.
This commit is contained in:
Lukasz Raczylo
2021-03-24 07:26:39 +00:00
committed by GitHub
parent 96b5bd6709
commit 68251ff9a5
6 changed files with 52 additions and 2 deletions
+35
View File
@@ -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
+1
View File
@@ -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:
+3 -1
View File
@@ -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"
+4 -1
View File
@@ -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
+1
View File
@@ -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
+8
View File
@@ -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"