ansible/roles/pi-shairport/tasks/main.yml

38 lines
983 B
YAML
Raw Normal View History

2020-05-10 15:25:38 +02:00
---
- name: Apt install dependencies
apt:
cache_valid_time: 7200
state: present
name:
- build-essential
- git
- xmltoman
- autoconf
- automake
- libtool
- libpopt-dev
- libconfig-dev
- libasound2-dev
- avahi-daemon
- libavahi-client-dev
- libssl-dev
- libsoxr-dev
- name: Build and Install Shairport sync (may take a while)
script: "build-shairport-sync.sh ${shairport_sync_version}"
args:
creates: /usr/local/bin/shairport-sync
- name: Copy config
template: src=shairport-sync.conf dest=/etc/shairport-sync.conf
- name: Modify service file to run as root
lineinfile:
path: /lib/systemd/system/shairport-sync.service
regexp: "^#?User="
line: "User=root"
- name: Restart shairport-sync
systemd: name=shairport-sync state=restarted enabled=yes daemon_reload=yes
- name: Add to sysdweb
include_role:
name: pi-sysdweb
vars:
sysdweb_name: shairport-sync