33 lines
976 B
YAML
33 lines
976 B
YAML
|
#!/usr/bin/ansible-playbook
|
||
|
# vim:ft=ansible:
|
||
|
---
|
||
|
- name: Install and configure PulseAudio
|
||
|
block:
|
||
|
- name: Install packages
|
||
|
apt:
|
||
|
name:
|
||
|
- pulseaudio
|
||
|
- name: Template out configs
|
||
|
template:
|
||
|
src: "{{ item.src }}"
|
||
|
dest: "{{ item.dest }}"
|
||
|
mode: "{{ item.mode }}"
|
||
|
loop:
|
||
|
- { src: "pulse-client.conf", dest: "/etc/pulse/client.conf", mode: "0644" }
|
||
|
- { src: "pulse-daemon.conf", dest: "/etc/pulse/daemon.conf", mode: "0644" }
|
||
|
- { src: "pulse-default.pa", dest: "/etc/pulse/default.pa", mode: "0644" }
|
||
|
- { src: "pulseaudio.service", dest: "/etc/systemd/system/pulseaudio.service", mode: "0644" }
|
||
|
- name: Assure pulse user
|
||
|
user:
|
||
|
name: pulseaudio
|
||
|
password: "!"
|
||
|
system: yes
|
||
|
home: /var/lib/pulse
|
||
|
groups: audio
|
||
|
- name: Enable service
|
||
|
systemd:
|
||
|
name: pulseaudio
|
||
|
enabled: yes
|
||
|
daemon_reload: yes
|
||
|
become: yes
|