Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions manifests/if/static.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# $ipaddress - required
# $netmask - required
# $gateway - optional
# $hwaddr_disable - optional
# $macaddress - optional - defaults to macaddress_$title
# $userctl - optional - defaults to false
# $mtu - optional
Expand Down Expand Up @@ -44,6 +45,7 @@
$ipaddress,
$netmask,
$gateway = '',
$hwaddr_disable = false,
$macaddress = '',
$userctl = false,
$mtu = '',
Expand All @@ -65,18 +67,19 @@
validate_bool($userctl)

network_if_base { $title:
ensure => $ensure,
ipaddress => $ipaddress,
netmask => $netmask,
gateway => $gateway,
macaddress => $macaddy,
bootproto => 'none',
userctl => $userctl,
mtu => $mtu,
ethtool_opts => $ethtool_opts,
peerdns => $peerdns,
dns1 => $dns1,
dns2 => $dns2,
domain => $domain,
ensure => $ensure,
ipaddress => $ipaddress,
netmask => $netmask,
gateway => $gateway,
hwaddr_disable => $hwaddr_disable,
macaddress => $macaddy,
bootproto => 'none',
userctl => $userctl,
mtu => $mtu,
ethtool_opts => $ethtool_opts,
peerdns => $peerdns,
dns1 => $dns1,
dns2 => $dns2,
domain => $domain,
}
} # define network::if::static
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
# $ensure - required - up|down
# $ipaddress - required
# $netmask - required
# $hwaddr_disable - optional
# $macaddress - required
# $gateway - optional
# $bootproto - optional
Expand Down Expand Up @@ -96,6 +97,7 @@
$ensure,
$ipaddress,
$netmask,
$hwaddr_disable = false,
$macaddress,
$gateway = '',
$bootproto = 'none',
Expand Down
2 changes: 1 addition & 1 deletion templates/ifcfg-eth.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###
DEVICE=<%= @interface %>
BOOTPROTO=<%= @bootproto %>
<% if [email protected]? %>HWADDR=<%= @macaddress %>
<% if @hwaddr_disable != true and [email protected]? %>HWADDR=<%= @macaddress %>
<% end -%>
ONBOOT=<%= @onboot %>
HOTPLUG=<%= @onboot %>
Expand Down