Skip to content
Snippets Groups Projects
Commit 3e961215 authored by Matthias Hensler's avatar Matthias Hensler
Browse files

Bugfix: remove duplicate defintion for Exec[network_restart_${name}]

if network::interface and network::mroute is used for the same
interface, and $restart_all_nics is false, the definition for
network_restart will be duplicated, using puppet to fail.

if you use
  network::mroute { 'static-eth0':
    interface => 'eth0'
    ...
  }
puppet will not complain, but create a "route-static-eth0"-file which
will not be pickuped by networkmanager.

So either move the exec-definition into a separate file (and use it from
with the interface.pp and mroute.pp manifest), or check if the
exec-definition was already defined, or (the way I choosed for now) use
a different name for the exec-ressource.
parent 9b56af4b
No related branches found
No related tags found
Loading
...@@ -98,12 +98,12 @@ define network::mroute ( ...@@ -98,12 +98,12 @@ define network::mroute (
default => $reload_command, default => $reload_command,
} }
if $restart_all_nic == false and $::kernel == 'Linux' { if $restart_all_nic == false and $::kernel == 'Linux' {
exec { "network_restart_${name}": exec { "network_restart_route_${name}":
command => $real_reload_command, command => $real_reload_command,
path => '/sbin:/bin:/usr/sbin:/usr/bin', path => '/sbin:/bin:/usr/sbin:/usr/bin',
refreshonly => true, refreshonly => true,
} }
$network_notify = "Exec[network_restart_${name}]" $network_notify = "Exec[network_restart_route_${name}]"
} else { } else {
$network_notify = $network::manage_config_file_notify $network_notify = $network::manage_config_file_notify
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment