Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
ethtool_setup.pp 495 B
Newer Older
  • Learn to ignore specific revisions
  • # Ring-Parameter für gültige Interfaces ändern
    class ubuntu_server::ethtool_setup{
    
        define ring_parameters($if=$title) {
            exec{"$if":
                path => $path,
                command => "ethtool -G $if rx 1024 tx 1024",
                onlyif => "bash -c 'if [ $(ethtool -g ${if} 2>/dev/null | grep -c 1024) -ne 2 ] && ethtool -g ${if} 2>/dev/null ; then true; else false; fi'",
            }
        }
    
        $interface_names = split($interfaces, ',')
    
        ring_parameters{$interface_names: }
    
    }