Skip to content

Commit

Permalink
Merge pull request #21 from fbourqui/master
Browse files Browse the repository at this point in the history
Change default renderer to not specified which will default to systemd-networkd.
  • Loading branch information
mrlesmithjr committed Jul 14, 2020
2 parents 4f8b993 + 685a879 commit f4d1d30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# defaults file for ansible-netplan
netplan_config_file: /etc/netplan/config.yaml
netplan_config_file: /etc/netplan/ansible-config.yaml

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

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

netplan_configuration:
{}
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- artful
- bionic
- focal

galaxy_tags:
- networking
Expand Down
2 changes: 2 additions & 0 deletions templates/etc/netplan/config.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
network:
version: {{ netplan_configuration['network']['version']|default('2') }}
{% if netplan_renderer is not none %}
renderer: {{ netplan_renderer }}
{% endif %}
{% if netplan_configuration['network']['ethernets'] is defined %}
ethernets:
{{ netplan_configuration['network']['ethernets']|to_nice_yaml|indent(4, true) }}
Expand Down

0 comments on commit f4d1d30

Please sign in to comment.