Skip to content

Commit

Permalink
[ansible/telemetry] Detect properly sound server
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Nov 21, 2023
1 parent f8aaf42 commit 5057150
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions ansible/roles/ovos_installer/tasks/sound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,17 @@
state: touch
notify: Start Sound Server

- name: Re-detect sound server
ansible.builtin.shell:
cmd: |
if pgrep -x "pipewire-pulse$" &>/dev/null || pgrep -x "pulseaudio$" &>/dev/null; then
echo "pulseaudio"
elif pgrep -x "pipewire$" &>/dev/null; then
echo "pipewire"
fi
executable: /bin/bash
register: _detect_sound_server
changed_when: false

- name: Flush handlers sound
ansible.builtin.meta: flush_handlers
4 changes: 2 additions & 2 deletions ansible/roles/ovos_installer/templates/telemetry.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"os_version": "{{ ansible_distribution_version }}",
"os_kernel": "{{ ansible_kernel }}",
"architecture": "{{ ansible_architecture }}",
"sound_server": "{{ ovos_installer_sound_server | lower }}",
"sound_server": "{{ _detect_sound_server.stdout }}",
"python_version": "{{ ansible_python_version }}",
"display_server": "{{ ovos_installer_display_server | lower }}",
"container": {{ true if ovos_installer_method == 'containers' else false }},
"venv": {{ true if ovos_installer_method == 'virtualenv' else false }},
"installed_at": "{{ ansible_date_time.iso8601_micro }}",
"channel": "{{ ovos_installer_channel }}",
"profile": "{{ ovos_installer_profile }}",
"raspberry_pi": "{{ ovos_installer_raspberrypi }}",
"raspberry_pi": "{{ 'n/a' if ovos_installer_raspberrypi == 'N/A' else ovos_installer_raspberrypi }}",
"skills_feature": {{ ovos_installer_feature_skills }},
"gui_feature": {{ ovos_installer_feature_gui }},
"cpu_capable": {{ ovos_installer_cpu_is_capable }},
Expand Down

0 comments on commit 5057150

Please sign in to comment.