Skip to content

Commit 8a95a83

Browse files
Merge pull request #284 from sbraz/cleanup_networkmanager_system_connection_files
fix(cleanup): remove NetworkManager system connection files
2 parents 3e82c08 + 27ae0b0 commit 8a95a83

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ansible/roles/cleanup_vm/tasks/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@
1919
loop_control:
2020
label: "{{ item.path }}"
2121

22+
- name: Find NetworkManager system connection files
23+
ansible.builtin.find:
24+
paths: /etc/NetworkManager/system-connections
25+
patterns: "*.nmconnection"
26+
register: networkmanager_system_connection_files
27+
28+
- name: Delete found NetworkManager system connection files
29+
ansible.builtin.file:
30+
path: "{{ item.path }}"
31+
state: absent
32+
loop: "{{ networkmanager_system_connection_files.files }}"
33+
loop_control:
34+
label: "{{ item.path }}"
35+
2236
- name: Delete DNF cache
2337
command: dnf clean all
2438

0 commit comments

Comments
 (0)