This repository has been archived on 2025-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
salt-master/hardware/raspberrypi/fan/init.sls
2020-05-24 17:07:51 +02:00

27 lines
593 B
Plaintext

{%
set has_fan = salt['pillar.get'](
'hardware:raspberrypi:fan:has_fan',
default=False
)
%}
include:
- systemd.units
file-fan-control:
file:
- managed
- name: {{ salt['pillar.get']('hardware:raspberrypi:fan:controller') }}
- source: salt://hardware/raspberrypi/fan/files/fan_ctrl.py
- user: root
- group: root
- mode: 0755
{{ salt['pillar.get']('hardware:raspberrypi:fan:service_name') }}:
service.running:
- enable: {{ has_fan }}
- reload: {{ has_fan }}
- watch:
- file: {{ salt['pillar.get']('hardware:raspberrypi:fan:controller') }}