refine systemd_networkd

This commit is contained in:
2023-08-12 20:19:07 +10:00
parent 24f3a7c485
commit a2ec933cf8
15 changed files with 97 additions and 90 deletions

View File

@ -1,3 +1,3 @@
default_network_services:
Archlinux:
NetworkManager
- NetworkManager.service

View File

@ -23,7 +23,11 @@
- Restart systemd-resolved
- Restart systemd-networkd
- name: Get service facts
ansible.builtin.service_facts:
- name: Disable non-systemd networking services
when: item in ansible_facts.services
ansible.builtin.service:
name: "{{ item }}"
state: stopped

View File

@ -10,6 +10,6 @@ LinkLocalAddressing=False
LLDP={{ item.lldp | default(true) }}
{% if item.vlans is defined -%}
{% for vlan in item.vlans -%}
VLAN={{ item.vlan }}
VLAN={{ vlan }}
{% endfor -%}
{% endif -%}