feat: for bluetooth audio
This commit is contained in:
+60
-18
@@ -70,18 +70,33 @@
|
||||
- net-tools
|
||||
- libconfig9
|
||||
- avahi-daemon
|
||||
# - bluez-alsa-utils
|
||||
- libdbus-1-3
|
||||
- libglib2.0-0
|
||||
- libbluetooth3
|
||||
- libsbc1
|
||||
- libfdk-aac2
|
||||
- libldacbt-abr2
|
||||
- libldacbt-enc2
|
||||
# - upmpdcli
|
||||
state: present
|
||||
cache_valid_time: 3153600 # 365天缓存
|
||||
update_cache: no
|
||||
become: yes
|
||||
tags: apt
|
||||
- name: uninstall bluez-alsa-utils
|
||||
shell:
|
||||
cmd: apt remove -y bluez-alsa-utils
|
||||
become: yes
|
||||
tags: apt
|
||||
|
||||
- name: Create directories
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: "{{ item.mode | default('0755') }}"
|
||||
loop:
|
||||
- path: /var/lib/mpd/playlists
|
||||
- path: /var/lib/mpd/music
|
||||
- path: /usr/local/lib/systemd/system
|
||||
- path: /srv/login
|
||||
- path: /usr/var/lib/bluealsa
|
||||
- path: /srv/bluez-alsa
|
||||
|
||||
|
||||
- name: Copy static files
|
||||
copy:
|
||||
@@ -120,17 +135,6 @@
|
||||
dest: /usr/local/bin/xplayer-start.sh
|
||||
mode: '0755'
|
||||
|
||||
- name: Create directories
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: "{{ item.mode | default('0755') }}"
|
||||
loop:
|
||||
- path: /var/lib/mpd/playlists
|
||||
- path: /var/lib/mpd/music
|
||||
- path: /usr/local/lib/systemd/system
|
||||
- path: /srv/login
|
||||
|
||||
- name: update mpd data
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
@@ -176,6 +180,29 @@
|
||||
register: copy_result
|
||||
changed_when: copy_result.changed or (force_update | default(false) | bool)
|
||||
|
||||
- name: update bluealsa
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "{{ item.mode | default('0644') }}"
|
||||
loop:
|
||||
- src: ../files/bluealsa.service
|
||||
dest: /etc/systemd/system/bluealsa.service
|
||||
- src: ../files/install_bluealsa_openaptx.sh
|
||||
dest: /usr/bin/install_bluealsa_openaptx.sh
|
||||
mode: '0755'
|
||||
- src: ../files/bluealsa_bundle.tar.gz
|
||||
dest: /srv/bluez-alsa/bluealsa_bundle.tar.gz
|
||||
tags: bluealsa
|
||||
notify:
|
||||
- install_bluealsa_openaptx
|
||||
- reload_systemd
|
||||
- enable_bluealsa
|
||||
- stop_bluealsa
|
||||
- start_bluealsa
|
||||
register: copy_result
|
||||
changed_when: copy_result.changed or (force_update | default(false) | bool)
|
||||
|
||||
- name: update camilladsp
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
@@ -400,5 +427,20 @@
|
||||
- name: reboot_required
|
||||
shell:
|
||||
cmd: echo "need reboot"
|
||||
|
||||
|
||||
- name: enable_bluealsa
|
||||
shell:
|
||||
cmd: systemctl enable bluealsa
|
||||
- name: stop_bluealsa
|
||||
shell:
|
||||
cmd: systemctl stop bluealsa
|
||||
- name: start_bluealsa
|
||||
shell:
|
||||
cmd: systemctl start bluealsa
|
||||
- name: restart_bluealsa
|
||||
shell:
|
||||
cmd: systemctl restart bluealsa
|
||||
- name: install_bluealsa_openaptx
|
||||
shell:
|
||||
cmd: /usr/bin/install_bluealsa_openaptx.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user