install.fairie/home/dot_local/share/ansible/tasks/qubes/remove-shortcut.yml
2023-07-16 01:40:26 -04:00

20 lines
538 B
YAML

---
- name: Check if {{ item }} desktop link exists
stat:
path: '/usr/share/applications/{{ item }}'
register: sys_tool_link
- name: Backup {{ item }} link to /usr/share/applications/hidden
become: true
copy:
src: '/usr/share/applications/{{ item }}'
dest: '/usr/share/applications/hidden/{{ item }}'
remote_src: true
when: sys_tool_link.stat.exists
- name: Remove {{ item }} link from the desktop shortcut menu
become: true
file:
path: '{{ item }}'
state: absent
when: sys_tool_link.stat.exists