client-pull-installation/roles/domain/tasks/audio.yml

44 lines
1.1 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: 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