monakhos/ansible/roles/xdg_browser/tasks/main.yaml

13 lines
468 B
YAML
Raw Permalink Normal View History

2024-07-08 09:06:40 +00:00
- name: Get data about default Xdg browse
ansible.builtin.command: xdg-settings get default-web-browser
register: xdg_browser
changed_when: false
- name: Print desktop entry (IQ9202410)
debug:
msg: "{{ xdg_browser }} {{ xdg_browser.stdout }} {{ default_browser }}"
- name: Set default Xdg browser
when: "xdg_browser.stdout != default_browser + '.desktop'"
ansible.builtin.command: "xdg-settings set default-web-browser {{ default_browser }}.desktop"