--- # 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 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 args: warn: false - 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