The netplan module manages and applies netplan configuration.
- Puppet >= 4.0
- puppetlabs/stdlib
- puppetlabs/concat
puppet code:
include netplan
Hiera yaml:
netplan::version: 2
netplan::renderer: networkd
netplan::purge_config: true
netplan::ethernets:
eno1:
dhcp4: yes
addresses:
- 192.168.0.125/16
nameservers:
search: [foo.local, bar.local]
addresses: [8.8.8.8, 4.4.4.4]
routes:
- to: 10.10.0.1/16
via: 10.20.0.1
class { 'netplan':
config_file => '/etc/netplan/01-custom.yaml',
ethernets => {
'ens5' => {
'dhcp4' => false
}
},
bridges => {
'br0' => {
'dhcp4' => true,
'interfaces' => [ens5]
}
},
netplan_apply => true,
}
This module was only tested on Ubuntu 18.04.
The documentation of all parameters originates from the Netplan Documentation