2022-09-20 13:51:20 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: install necessary packages
|
|
|
|
apk:
|
|
|
|
name:
|
|
|
|
- gcc
|
|
|
|
- git
|
|
|
|
- make
|
|
|
|
- musl-dev
|
|
|
|
- tar
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: let builder own the src directory
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: /var/lib/builder/src
|
|
|
|
owner: builder
|
|
|
|
group: builder
|
|
|
|
|
|
|
|
- name: clone git repo
|
|
|
|
git:
|
|
|
|
repo: https://github.com/kubesail/pibox-os.git
|
|
|
|
dest: /var/lib/builder/src/pibox-os
|
|
|
|
clone: true
|
|
|
|
become_user: builder
|
|
|
|
|
|
|
|
- name: build and install bcm2835-1.68
|
|
|
|
include_tasks: bcm2835.yml
|
|
|
|
|
|
|
|
- name: build and install pi_fan_hwpwm
|
|
|
|
include_tasks: pi_fan_hwpwm.yml
|
|
|
|
|
|
|
|
- name: copy init script
|
|
|
|
copy:
|
|
|
|
src: init.d/pi_fan_hwpwm
|
|
|
|
dest: /etc/init.d/pi_fan_hwpwm
|
|
|
|
owner: root
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
- name: enable pi_fan_hwpwm
|
|
|
|
service:
|
|
|
|
name: pi_fan_hwpwm
|
|
|
|
state: started
|
|
|
|
enabled: true
|
|
|
|
runlevel: default
|
|
|
|
|
|
|
|
- name: add files to lbu
|
|
|
|
lbu:
|
|
|
|
include:
|
|
|
|
- /usr/local/sbin/pi_fan_hwpwm
|
|
|
|
- /etc/init.d/pi_fan_hwpwm
|
2022-10-19 17:58:20 +02:00
|
|
|
when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]
|
2022-09-20 13:51:20 +02:00
|
|
|
|
|
|
|
- name: add iomem=relaxed to cmdline.txt
|
|
|
|
replace:
|
|
|
|
path: /media/mmcblk0p1/cmdline.txt
|
|
|
|
regexp: '^([\w](?!.*\biomem=relaxed\b).*)$'
|
|
|
|
replace: '\1 iomem=relaxed'
|