35 lines
926 B
YAML
35 lines
926 B
YAML
---
|
|
# Manages reactivation of pulseaudio as system daemon
|
|
|
|
- name: "Allowing pulseaudio to run at startup"
|
|
replace:
|
|
regexp: '^#start on runlevel'
|
|
replace: 'start on runlevel [2345]'
|
|
dest: /etc/init/pulseaudio.conf
|
|
|
|
- name: Starting pulseaudio service
|
|
service:
|
|
name: pulseaudio
|
|
state: started
|
|
become: yes
|
|
|
|
- name: "Configuring client options"
|
|
lineinfile:
|
|
line: '{{ item }}'
|
|
dest: /etc/pulse/client.conf
|
|
state: present
|
|
with_items:
|
|
- 'default-server = /var/run/pulse/native'
|
|
- 'autospawn = no'
|
|
|
|
- name: Disabling pulseaudio startup on lightdm
|
|
shell: chmod -x /usr/bin/start-pulseaudio-x11
|
|
become: yes
|
|
|
|
- name: Adding pulseaudio fixing script at reboot.
|
|
lineinfile:
|
|
line: '@reboot root curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/pulseaudio-perms.sh | bash >/dev/null 2>&1'
|
|
dest: /etc/cron.d/pulseaudio-perms
|
|
create: yes
|
|
state: present
|