2015-09-17 17:20:42 +02:00
|
|
|
---
|
|
|
|
# Manages reactivation of pulseaudio as system daemon
|
|
|
|
|
2016-10-04 00:37:58 +02:00
|
|
|
- name: "Changing pulseaudio upstart script"
|
|
|
|
template:
|
|
|
|
src: pulseaudio.conf
|
2015-09-17 17:20:42 +02:00
|
|
|
dest: /etc/init/pulseaudio.conf
|
2016-10-04 00:37:58 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2015-09-17 17:20:42 +02:00
|
|
|
|
2016-02-20 16:09:44 +01:00
|
|
|
- name: "Checking if pulseaudio is started"
|
|
|
|
shell: /sbin/status pulseaudio
|
|
|
|
register: pulseaudio_status
|
|
|
|
|
2015-09-17 17:25:23 +02:00
|
|
|
- name: Starting pulseaudio service
|
2016-02-20 16:09:44 +01:00
|
|
|
shell: /usr/sbin/service pulseaudio start
|
|
|
|
when: pulseaudio_status.stdout.find("start/running") == -1
|
2015-09-17 17:20:42 +02:00
|
|
|
|
|
|
|
- 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
|
2019-11-19 00:10:53 +01:00
|
|
|
args:
|
|
|
|
warn: false
|
2015-09-17 17:20:42 +02:00
|
|
|
|
2018-11-08 23:14:22 +01:00
|
|
|
- name: Removing old (and not-working) approach
|
|
|
|
file:
|
|
|
|
path: /etc/cron.d/pulseaudio-perms
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: Get the new script
|
|
|
|
get_url:
|
|
|
|
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/paperms/paperms.sh"
|
|
|
|
dest: /tmp/paperms.sh
|
|
|
|
|
|
|
|
- name: Run the script (install other support files and fixes the permissions)
|
|
|
|
shell: bash /tmp/paperms.sh
|