38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
---
|
|
# Manages reactivation of pulseaudio as system daemon
|
|
|
|
- name: "Changing pulseaudio upstart script"
|
|
template:
|
|
src: pulseaudio.conf
|
|
dest: /etc/init/pulseaudio.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: "Checking if pulseaudio is started"
|
|
shell: /sbin/status pulseaudio
|
|
register: pulseaudio_status
|
|
|
|
- name: Starting pulseaudio service
|
|
shell: /usr/sbin/service pulseaudio start
|
|
when: pulseaudio_status.stdout.find("start/running") == -1
|
|
|
|
- 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
|
|
|
|
#- 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
|