ansible/roles/pulseaudio/tasks/main.yml
Salt 23fac2d48e Finally remove pulseaudio user services
GOD this was an annoying problem
2021-01-25 19:55:54 -06:00

22 lines
941 B
YAML

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: assure pulse package
apt: name=pulseaudio
when: ansible_os_family == 'Debian'
- 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
- 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