feat: restart networkmanager on el9

- update networking module to restart:
    NetworkManager on el9
    network on el8
This commit is contained in:
Ben Vincent 2025-03-29 19:29:30 +11:00
parent 99f2aa0db0
commit fbbab13f42

View File

@ -29,7 +29,10 @@ class networking (
# determine which networking service to restart # determine which networking service to restart
$restart_command = $facts['os']['family'] ? { $restart_command = $facts['os']['family'] ? {
'RedHat' => '/usr/bin/systemctl restart network', 'RedHat' => $facts['os']['release']['major'] ? {
'8' => '/usr/bin/systemctl restart network',
'9' => '/usr/bin/systemctl restart NetworkManager',
},
'Debian' => '/usr/bin/systemctl restart networking', 'Debian' => '/usr/bin/systemctl restart networking',
default => fail('Unsupported OS in networking-restart-command'), default => fail('Unsupported OS in networking-restart-command'),
} }