Add new pulseaudio role
It's like system mode but not
This commit is contained in:
parent
c351c32c05
commit
8aa0027bfa
@ -40,6 +40,8 @@
|
||||
38306234316364306134396138376230626630633733306432626637616239373838646433343761
|
||||
3436643661633766616564663937346232353666386531363438
|
||||
tags: [ desktop ]
|
||||
- role: pulseaudio
|
||||
tags: [ pulse, pulseaudio ]
|
||||
- role: desktop-sddm
|
||||
vars:
|
||||
sddm_theme_name: "breeze"
|
||||
|
@ -23,9 +23,6 @@
|
||||
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: "sshd_config", dest: "/etc/ssh/sshd_config", mode: "0644" }
|
||||
- { src: "nomouseaccel.conf", dest: "/etc/X11/xorg.conf.d/90-mouse-acceleration.conf", mode: "0644" }
|
||||
- { src: "touchpad.conf", dest: "/etc/X11/xorg.conf.d/90-touchpad.conf", mode: "0644" }
|
||||
|
32
roles/pulseaudio/tasks/main.yml
Normal file
32
roles/pulseaudio/tasks/main.yml
Normal file
@ -0,0 +1,32 @@
|
||||
#!/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
|
23
roles/pulseaudio/templates/pulseaudio.service
Normal file
23
roles/pulseaudio/templates/pulseaudio.service
Normal file
@ -0,0 +1,23 @@
|
||||
# vim:ft=systemd
|
||||
# NOTE: This service is ONLY useful IF you have the following:
|
||||
# * client.conf is set to not autospawn and listen to a socket instead
|
||||
# * default.pa is configured to start such a socket
|
||||
# Using this unit file and complaining to me that it doesn't work without
|
||||
# the other configs in place will result in me not giving a shit
|
||||
|
||||
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
|
||||
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
|
||||
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
|
||||
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
|
||||
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
|
||||
[Unit]
|
||||
Description=Pulseaudio sound server
|
||||
|
||||
[Service]
|
||||
User=pulseaudio
|
||||
Group=pulseaudio
|
||||
ExecStart=/usr/bin/pulseaudio --disallow-exit
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user