2020-12-15 18:18:32 -06:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
- name: assure pulse package
|
|
|
|
apt: name=pulseaudio
|
|
|
|
when: ansible_os_family == 'Debian'
|
2021-01-25 19:55:54 -06:00
|
|
|
- name: remove user pulseaudio services
|
|
|
|
file: state=absent path={{ item }}
|
|
|
|
loop:
|
|
|
|
- /etc/systemd/user/default.target.wants/pulseaudio.service
|
|
|
|
- /etc/systemd/user/sockets.target.wants/pulseaudio.socket
|
2020-12-15 18:18:32 -06:00
|
|
|
- name: template out configs
|
|
|
|
template: src={{ item.src }} dest={{ item.dest }} mode=0644
|
|
|
|
loop:
|
|
|
|
- { src: "pulse-client.conf", dest: "/etc/pulse/client.conf" }
|
|
|
|
- { src: "pulse-daemon.conf", dest: "/etc/pulse/daemon.conf" }
|
|
|
|
- { src: "pulse-default.pa", dest: "/etc/pulse/default.pa" }
|
|
|
|
- { src: "pulseaudio.service", dest: "/etc/systemd/system/pulseaudio.service" }
|
|
|
|
- name: assure pulse user
|
|
|
|
user: name=pulseaudio password="!" system=yes home=/var/lib/pulse groups=audio
|
|
|
|
- name: enable pulse service
|
|
|
|
systemd: name=pulseaudio enabled=yes state=started daemon_reload=yes
|