feat: add default browser role

This commit is contained in:
Matthieu Bessat 2024-07-08 11:06:40 +02:00
parent 5504ee882a
commit 93c9f6cfbb

View file

@ -0,0 +1,12 @@
- 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"