- add route-reflector role and hieradata - enable using dhcp in networkd - add hieradata/node/* entries for route-reflectors
28 lines
1006 B
Puppet
28 lines
1006 B
Puppet
# manage static interfaces
|
|
define networking::static (
|
|
String $type,
|
|
Stdlib::IP::Address $netmask = '255.255.255.0',
|
|
Integer[100-9200] $mtu = 1500,
|
|
Boolean $dhcp = false,
|
|
Optional[Boolean] $forwarding = false,
|
|
Optional[Stdlib::IP::Address] $ipaddress = undef,
|
|
Optional[Stdlib::IP::Address] $gateway = undef,
|
|
Optional[Array[Stdlib::IP::Address]] $dns = undef,
|
|
Optional[Array[Stdlib::Fqdn]] $domains = undef,
|
|
Optional[Integer[0-4096]] $vlan = undef,
|
|
Optional[Variant[Boolean,String]] $bridge = undef,
|
|
Optional[Integer[0-4294967294]] $txqueuelen = undef,
|
|
Optional[Stdlib::MAC] $mac = undef,
|
|
) {
|
|
include systemd
|
|
|
|
systemd::network { "${title}.network":
|
|
content => template('networking/networkd-network.erb'),
|
|
}
|
|
#if $type == 'physical' and $mac {
|
|
# systemd::network { "${title}.link":
|
|
# content => template('networking/networkd-link.erb'),
|
|
# }
|
|
#}
|
|
}
|