Skip to content

Commit f4d1d30

Browse files
authored
Merge pull request #21 from fbourqui/master
Change default renderer to not specified which will default to systemd-networkd.
2 parents 4f8b993 + 685a879 commit f4d1d30

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

defaults/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
# defaults file for ansible-netplan
3-
netplan_config_file: /etc/netplan/config.yaml
3+
netplan_config_file: /etc/netplan/ansible-config.yaml
44

55
# switch to enable/disable the role completely
66
netplan_enabled: true
77

8-
# Either networkd or NetworkManager
9-
netplan_renderer: networkd
8+
# Configured devices get handled by systemd-networkd by default, unless explicitly marked as managed by a specific renderer (NetworkManager)
9+
netplan_renderer:
1010

1111
netplan_configuration:
1212
{}

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ galaxy_info:
1010
platforms:
1111
- name: Ubuntu
1212
versions:
13-
- artful
1413
- bionic
14+
- focal
1515

1616
galaxy_tags:
1717
- networking

templates/etc/netplan/config.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
network:
33
version: {{ netplan_configuration['network']['version']|default('2') }}
4+
{% if netplan_renderer is not none %}
45
renderer: {{ netplan_renderer }}
6+
{% endif %}
57
{% if netplan_configuration['network']['ethernets'] is defined %}
68
ethernets:
79
{{ netplan_configuration['network']['ethernets']|to_nice_yaml|indent(4, true) }}

0 commit comments

Comments
 (0)