ansible/roles/pulseaudio/tasks/main.yml
Salt 8aa0027bfa Add new pulseaudio role
It's like system mode but not
2020-09-16 14:28:02 -05:00

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