diff --git a/manifests/interface.pp b/manifests/interface.pp index 190fdd74ebf502847948f27094389cbe52459b72..ef89d94a017b84db4eac1d4661517dd64c055ac6 100644 --- a/manifests/interface.pp +++ b/manifests/interface.pp @@ -15,6 +15,7 @@ # [*netmask*] # [*broadcast*] # [*hwaddr*] +# [*macaddr*] # String. Default: undef # Standard network parameters # @@ -115,7 +116,10 @@ # If both are present ipaddr is used. # # $hwaddr = undef, -# hwaddr if set configures the mac address of the interface. +# hwaddr if set assigns this interface to the device with this mac. +# +# $macaddr = undef, +# macaddr if set spoofs the mac address of the interface. # # $prefix = undef, # Network PREFIX aka CIDR notation of the network mask. The PREFIX @@ -287,6 +291,7 @@ define network::interface ( $broadcast = undef, $gateway = undef, $hwaddr = undef, + $macaddr = undef, $mtu = undef, $description = undef, diff --git a/templates/interface/RedHat.erb b/templates/interface/RedHat.erb index 0808cf8023c9bcfd76189cfa0b27db0a438b4336..e9cb5df125f27a8783c2762e382a84b1d8bc6264 100644 --- a/templates/interface/RedHat.erb +++ b/templates/interface/RedHat.erb @@ -100,6 +100,9 @@ DEFROUTE="<%= @manage_defroute %>" <% if @manage_hwaddr -%> HWADDR="<%= @manage_hwaddr %>" <% end -%> +<% if @macaddr -%> +MACADDR="<%= @macaddr %>" +<% end -%> <% if @ipv6init -%> IPV6INIT="<%= @ipv6init %>" <% end -%>