dotfiles/provision/tasks/desktop/_hide-desktop.yml

18 lines
424 B
YAML
Raw Normal View History

2022-11-24 23:58:30 -08:00
- 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