From 91b2e28e5252413b8cd74c670bcec50503138cfb Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Sun, 23 Sep 2018 21:52:29 +0200 Subject: space_server: networkd: drop flaky cleanup It's still unfortunate that you can't easily tell ansible to manage a directory completely including which files should exists in it. Remove flaky code trying to implement that. --- roles/space_server/tasks/networkd.yml | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'roles/space_server/tasks') diff --git a/roles/space_server/tasks/networkd.yml b/roles/space_server/tasks/networkd.yml index 9e8ca3c..6bc3055 100644 --- a/roles/space_server/tasks/networkd.yml +++ b/roles/space_server/tasks/networkd.yml @@ -6,10 +6,6 @@ owner: root group: root mode: 0755 -- name: Get current network config - shell: 'ls -1 /etc/systemd/network/' - check_mode: no - register: network_files_all - name: Configure network copy: src: '{{ item }}' @@ -19,15 +15,6 @@ mode: 0644 with_fileglob: - 'networkd/network/*' - register: network_files - notify: - - restart networkd -- name: Clean up old files - file: - path: '/etc/systemd/network/{{ item }}' - state: absent - with_items: '{{ network_files_all.stdout_lines }}' - when: "item not in network_files.results|map(attribute='path')|map('basename')" notify: - restart networkd -- cgit v1.2.1