Skip to content
Snippets Groups Projects
Commit 4185592f authored by Anderson Vinicius's avatar Anderson Vinicius
Browse files

Bugfix: on Debian, when restart_all_nic parameter is set to false it will...

Bugfix: on Debian, when restart_all_nic parameter is set to false it will restart the interface if it has a configuration change
parent 085971a7
No related branches found
No related tags found
No related merge requests found
...@@ -310,9 +310,8 @@ class network ( ...@@ -310,9 +310,8 @@ class network (
} }
# Command that triggers network restart # Command that triggers network restart
exec { $service_restart_exec : exec { 'network_restart' :
command => $service_restart_exec, command => $service_restart_exec,
alias => 'network_restart',
refreshonly => true, refreshonly => true,
path => '/bin:/sbin:/usr/bin:/usr/sbin', path => '/bin:/sbin:/usr/bin:/usr/sbin',
} }
......
...@@ -762,7 +762,6 @@ define network::interface ( ...@@ -762,7 +762,6 @@ define network::interface (
mode => '0644', mode => '0644',
owner => 'root', owner => 'root',
group => 'root', group => 'root',
notify => $network_notify,
} }
} }
...@@ -772,6 +771,11 @@ define network::interface ( ...@@ -772,6 +771,11 @@ define network::interface (
order => $manage_order, order => $manage_order,
} }
if $restart_all_nic == true and $network::manage_config_file_notify != undef {
Concat['/etc/network/interfaces'] ~> Exec['network_restart']
} else {
Concat['/etc/network/interfaces'] ~> Exec <| title == "network_restart_${name}" |>
}
} }
if ! defined(Network::Interface['lo']) { if ! defined(Network::Interface['lo']) {
...@@ -779,6 +783,7 @@ define network::interface ( ...@@ -779,6 +783,7 @@ define network::interface (
address => '127.0.0.1', address => '127.0.0.1',
method => 'loopback', method => 'loopback',
manage_order => '05', manage_order => '05',
restart_all_nic => $restart_all_nic,
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment