mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
18 lines
424 B
YAML
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 |