aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/systemd-networkd
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/systemd-networkd')
-rw-r--r--ansible/roles/systemd-networkd/handlers/main.yml4
-rw-r--r--ansible/roles/systemd-networkd/tasks/main.yml9
2 files changed, 13 insertions, 0 deletions
diff --git a/ansible/roles/systemd-networkd/handlers/main.yml b/ansible/roles/systemd-networkd/handlers/main.yml
new file mode 100644
index 0000000..9656da4
--- /dev/null
+++ b/ansible/roles/systemd-networkd/handlers/main.yml
@@ -0,0 +1,4 @@
+- name: restart
+ systemd:
+ name: systemd-networkd
+ state: restarted
diff --git a/ansible/roles/systemd-networkd/tasks/main.yml b/ansible/roles/systemd-networkd/tasks/main.yml
new file mode 100644
index 0000000..13c167b
--- /dev/null
+++ b/ansible/roles/systemd-networkd/tasks/main.yml
@@ -0,0 +1,9 @@
+- systemd:
+ name: systemd-networkd
+ state: started
+ enabled: yes
+- loop: "{{ systemd_networkd__files | default([]) }}"
+ copy:
+ src: "{{ item }}"
+ dest: "/etc/systemd/network/{{ item | basename }}"
+ notify: restart