Skip to content

Commit

Permalink
[ansible/video] Detect WAYLAND_DISPLAY when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Aug 1, 2024
1 parent d983745 commit dcdf44c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ansible/roles/ovos_installer/tasks/video.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,19 @@
group: "{{ ovos_installer_group }}"
mode: "0600"
when: "'Raspberry Pi 5' in ovos_installer_raspberrypi and ovos_installer_display_server == 'N/A'"

- name: Block WAYLAND_DISPLAY
when: ovos_installer_display_server == "wayland"
block:
- name: Retrieve WAYLAND_DISPLAY variable
become: true
become_user: "{{ ovos_installer_user }}"
ansible.builtin.command:
cmd: echo $WAYLAND_DISPLAY
register: _ovos_wayland_display
changed_when: false

- name: Set ovos_wayland_display fact
ansible.builtin.set_fact:
ovos_wayland_display: "{{ _ovos_wayland_display.stdout }}"
when: _ovos_wayland_display.stdout | length > 0
1 change: 1 addition & 0 deletions ansible/roles/ovos_installer/templates/docker/env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ VOICE_SAT_PASSWORD={{ ovos_installer_satellite_password }}
VOICE_SAT_HOST=ws://{{ ovos_installer_listener_host }}
VOICE_SAT_PORT={{ ovos_installer_listener_port | default(5678) }}
{% endif %}
WAYLAND_DISPLAY={{ ovos_wayland_display if ovos_wayland_display is defined else 'wayland-0' }}
XDG_RUNTIME_DIR=/run/user/{{ ovos_installer_uid }}

0 comments on commit dcdf44c

Please sign in to comment.