dotfiles/provision/tasks/include/hide-desktop.yml

18 lines
424 B
YAML

- name: Check desktop file exists
ansible.builtin.stat:
path: "{{ item }}"
register: p
- name: Edit desktop file
ansible.builtin.lineinfile:
path: "{{ item }}"
insertafter: '^Type'
line: 'NoDisplay=true'
firstmatch: true
state: present
become: true
when: p.stat.exists
- debug:
msg: "Warning - {{ item }} does not exist"
when: p.stat.exists == False