feat: add default browser role
This commit is contained in:
parent
5504ee882a
commit
93c9f6cfbb
1 changed files with 12 additions and 0 deletions
12
ansible/roles/xdg_browser/tasks/main.yaml
Normal file
12
ansible/roles/xdg_browser/tasks/main.yaml
Normal 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"
|
Loading…
Reference in a new issue