aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/tasks
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2018-11-24 21:47:43 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2018-11-24 21:58:38 +0100
commit7560cc6b35204fa1c34653e39028f5cfe8d4abe4 (patch)
tree37ac93bdfb06ade998ec45bc9f69fc7d6bad78a9 /roles/space_server/tasks
parentffda72edc80b4719476b095cb35209ff809abf5c (diff)
downloadlabitat-ansible-7560cc6b35204fa1c34653e39028f5cfe8d4abe4.tar.gz
labitat-ansible-7560cc6b35204fa1c34653e39028f5cfe8d4abe4.tar.xz
labitat-ansible-7560cc6b35204fa1c34653e39028f5cfe8d4abe4.zip
space_server: networkd: smarter set difference
Diffstat (limited to 'roles/space_server/tasks')
-rw-r--r--roles/space_server/tasks/networkd.yml7
1 files changed, 3 insertions, 4 deletions
diff --git a/roles/space_server/tasks/networkd.yml b/roles/space_server/tasks/networkd.yml
index 0059ed6..364d9cb 100644
--- a/roles/space_server/tasks/networkd.yml
+++ b/roles/space_server/tasks/networkd.yml
@@ -1,5 +1,5 @@
---
-- name: Make sure directory exists
+- name: Make sure /etc/systemd/network exists
file:
dest: '/etc/systemd/network'
state: directory
@@ -19,15 +19,14 @@
owner: root
group: root
mode: 0644
- with_fileglob: 'network/*'
+ with_fileglob: 'networkd/*'
register: networkd_created
- name: Delete unneeded network configuration
file:
path: '{{ item }}'
state: absent
- with_items: "{{ networkd_existing.files|map(attribute='path')|list }}"
- when: "item not in networkd_created.results|map(attribute='dest')"
+ with_items: "{{ networkd_existing.files|map(attribute='path')|difference(networkd_created.results|map(attribute='dest'))|list }}"
- name: Create systemd-networkd-wait-online drop-in directory
file: