From 8353376b24e6f2c038575c8d378c348c4ee5e092 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 14 Sep 2024 20:38:55 +0200 Subject: systemd-networkd: Allow templating --- ansible/roles/systemd-networkd/tasks/main.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ansible/roles/systemd-networkd/tasks/main.yml') diff --git a/ansible/roles/systemd-networkd/tasks/main.yml b/ansible/roles/systemd-networkd/tasks/main.yml index 13c167b..0e8856b 100644 --- a/ansible/roles/systemd-networkd/tasks/main.yml +++ b/ansible/roles/systemd-networkd/tasks/main.yml @@ -1,9 +1,11 @@ -- systemd: +- become: yes + systemd: name: systemd-networkd state: started enabled: yes -- loop: "{{ systemd_networkd__files | default([]) }}" - copy: +- become: yes + loop: "{{ systemd_networkd__files | default([]) }}" + template: src: "{{ item }}" dest: "/etc/systemd/network/{{ item | basename }}" - notify: restart + notify: reload -- cgit v1.2.3