thinkcenter-obs: verify via dpkg not obs --version (Qt GUI aborts w/o X)

This commit is contained in:
Samuel James 2026-09-03 15:47:04 +00:00
parent 3f3ac99fb7
commit f789f7bd98

View File

@ -141,16 +141,24 @@
register: vcam_load register: vcam_load
failed_when: false failed_when: false
- name: "[verify] OBS binary present + version" - name: "[verify] Query obs-studio package status (dpkg, not the GUI binary)"
ansible.builtin.command: obs --version ansible.builtin.command: dpkg-query -W -f='${Status} ${Version}' obs-studio
register: obs_ver register: obs_pkg
changed_when: false
failed_when: false
- name: "[verify] obs binary present on PATH"
ansible.builtin.command: which obs
register: obs_bin
changed_when: false changed_when: false
failed_when: false failed_when: false
- name: "[verify] Assert OBS installed" - name: "[verify] Assert OBS installed"
ansible.builtin.assert: ansible.builtin.assert:
that: "'obs-studio' in (obs_install.stdout | default('')) or obs_ver.rc == 0 or ('OBS' in (obs_ver.stdout | default('')) | string)" that:
fail_msg: "OBS Studio does not appear to be installed." - "'install ok installed' in (obs_pkg.stdout | default(''))"
- obs_bin.rc == 0
fail_msg: "OBS Studio not installed. pkg='{{ obs_pkg.stdout | default('') }}', bin rc={{ obs_bin.rc }}"
success_msg: "OBS Studio installed." success_msg: "OBS Studio installed."
- name: "[report] OBS summary" - name: "[report] OBS summary"
@ -158,6 +166,6 @@
msg: msg:
- "===== thinkcenter OBS Studio =====" - "===== thinkcenter OBS Studio ====="
- "packages changed this run : {{ obs_install.changed }}" - "packages changed this run : {{ obs_install.changed }}"
- "OBS version : {{ obs_ver.stdout | default('(query failed — check after login)') | trim }}" - "OBS package : {{ obs_pkg.stdout | default('n/a') | trim }}"
- "v4l2loopback module loaded: {{ 'yes' if vcam_load.rc | default(1) == 0 else 'not yet (loads on Start Virtual Camera / reboot)' }}" - "v4l2loopback module loaded: {{ 'yes' if vcam_load.rc | default(1) == 0 else 'not yet (loads on Start Virtual Camera / reboot)' }}"
- "NOTE: on Mint X11 use XSHM/XComposite capture sources; PipeWire capture is for Wayland." - "NOTE: on Mint X11 use XSHM/XComposite capture sources; PipeWire capture is for Wayland."