Add playbook and roles for Audio Pi
This commit is contained in:
parent
7a869f6330
commit
96ac8de142
21 changed files with 516 additions and 2 deletions
3
playbooks/roles/hifiberry/handlers/main.yml
Normal file
3
playbooks/roles/hifiberry/handlers/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: Restart system
|
||||
ansible.builtin.reboot:
|
17
playbooks/roles/hifiberry/meta/argument_specs.yml
Normal file
17
playbooks/roles/hifiberry/meta/argument_specs.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
argument_specs:
|
||||
main:
|
||||
options:
|
||||
hifiberry__device:
|
||||
description: Which HiFiBerry board to enable
|
||||
type: str
|
||||
choices:
|
||||
- hifiberry-dac
|
||||
- hifiberry-dacplus
|
||||
- hifiberry-dacplushd
|
||||
- hifiberry-dacplusadc
|
||||
- hifiberry-dacplusadcpro
|
||||
- hifiberry-digi
|
||||
- hifiberry-digi-pro
|
||||
- hifiberry-amp
|
||||
required: true
|
9
playbooks/roles/hifiberry/meta/main.yml
Normal file
9
playbooks/roles/hifiberry/meta/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: distribution_check
|
||||
vars:
|
||||
distribution_check__supported_distributions:
|
||||
- name: Debian
|
||||
versions:
|
||||
- "11"
|
||||
- role: raspberry_pi_check
|
18
playbooks/roles/hifiberry/tasks/main.yml
Normal file
18
playbooks/roles/hifiberry/tasks/main.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
- name: Remove dtparam=audio=on
|
||||
ansible.builtin.lineinfile:
|
||||
line: dtparam=audio=on
|
||||
dest: /boot/config.txt
|
||||
state: absent
|
||||
notify: Restart system
|
||||
- name: Set audio=off for dtoverlay=vc4-kms-v3d
|
||||
ansible.builtin.lineinfile:
|
||||
regexp: ^dtoverlay=vc4-kms-v3d
|
||||
line: dtoverlay=vc4-kms-v3d,audio=off
|
||||
dest: /boot/config.txt
|
||||
notify: Restart system
|
||||
- name: Add hifiberry dtoverlay
|
||||
ansible.builtin.lineinfile:
|
||||
line: "dtoverlay={{ hifiberry__device }}"
|
||||
dest: /boot/config.txt
|
||||
notify: Restart system
|
Loading…
Add table
Add a link
Reference in a new issue