Skip to content

Commit

Permalink
Add and fix data types in network::if::none
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rx0 committed Apr 26, 2019
1 parent c34ac77 commit 6efb894
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions manifests/if/none.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
# Copyright (C) 2011 Mike Arnold, unless otherwise noted.
#
define network::if::none (
$ensure,
$macaddress = '',
$userctl = false,
$mtu = '',
$ethtool_opts = '',
$linkdelay = ''
Enum['up', 'down'] $ensure,
Optional[Stdlib::MAC] $macaddress = undef,
Boolean $userctl = false,
Optional[String] $mtu = undef,
Optional[String] $ethtool_opts = undef,
Optional[String] $linkdelay = undef
) {
if ! is_mac_address($macaddress) and ($macaddress != 'unmanaged') {
# Strip off any tailing VLAN (ie eth5.90 -> eth5).
$title_clean = regsubst($title,'^(\w+)\.\d+$','\1')
$macaddy = getvar("::macaddress_${title_clean}")
} elsif $macaddress == 'unmanaged' {
$macaddy = ''
$macaddy = undef
} else {
$macaddy = $macaddress
}
Expand Down

0 comments on commit 6efb894

Please sign in to comment.