diff --git a/ansible/roles/xdg_browser/tasks/main.yaml b/ansible/roles/xdg_browser/tasks/main.yaml new file mode 100644 index 0000000..4c51785 --- /dev/null +++ b/ansible/roles/xdg_browser/tasks/main.yaml @@ -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"