puppet-openvpn
puppet-openvpn copied to clipboard
Predictable Interface Names on Debian 9 (stretch) not working
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 5.3.3
- Ruby: 2.4.2
- Distribution: Debian 9 (stretch)
- Module version: 7.1.0
How to reproduce (e.g Puppet code you use)
Simply include the module and declare a server
What are you seeing
Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown variable: '::ipaddress_eth0'. at /etc/puppetlabs/code/environments/production/modules/openvpn/manifests/server.pp:451:47 at /etc/puppetlabs/code/environments/production/manif ests/openvpn.pp:10 on node dagobah.pondnet
What behaviour did you expect instead
No error
Output log
Any additional information you'd like to impart
As of Debian 9, predictable interface names are used by default. That means that there's no eth0
, etc. Instead, the interfaces are named by BIOS information. My primary interface is named eno1
. In fact... facter reports an empty interfaces
fact. There's no fact named ::ipaddress_eth0
, but there is one named ipaddress
.
And after doing what I thought was a decent search of things, I found the local
configuration option. That might benefit from being surfaced in the docs since predictable interface names are going to become more prevalent in various distros.
This default is also an issue on RedHat/CentOS 7, which also uses the predictable interface naming scheme.
From openvpn::server
:
String $local = $facts['ipaddress_eth0'],
Which results in
Error while evaluating a Resource Statement, Openvpn::Server[servername]: parameter 'local' expects a String value, got Undef
A more sane default would be just $facts['ipaddress']