Add playbook and roles for Audio Pi

This commit is contained in:
yuri 2022-12-18 04:36:53 +01:00
commit 96ac8de142
No known key found for this signature in database
GPG key ID: E646779AC54AEC64
21 changed files with 516 additions and 2 deletions

View file

@ -0,0 +1,3 @@
---
- name: Restart system
ansible.builtin.reboot:

View 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

View file

@ -0,0 +1,9 @@
---
dependencies:
- role: distribution_check
vars:
distribution_check__supported_distributions:
- name: Debian
versions:
- "11"
- role: raspberry_pi_check

View 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