systemd_networkd(role): introd. role for deploy. systemd-networkd config

This commit is contained in:
June 2025-09-20 20:05:02 +02:00
commit ed8670f7da
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
5 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,11 @@
# Role `systemd_networkd`
Deploys the given systemd-networkd configuration files.
## Support Distributions
Should work on Debian-based distributions.
## Required Arguments
- `systemd_networkd__config_dir`: Directory with systemd-networkd configs to deploy.

View file

@ -0,0 +1,6 @@
argument_specs:
main:
options:
systemd_networkd__config_dir:
type: path
required: true

View file

@ -0,0 +1,14 @@
- name: ensure rsync is installed
ansible.builtin.apt:
name: rsync
state: present
become: true
- name: synchronize systemd-networkd configs
ansible.posix.synchronize:
src: "{{ systemd_networkd__config_dir }}"
dest: "/etc/systemd/network"
archive: false
recursive: true
delete: true
become: true