Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lysator
Puppet
ipoib
Commits
1b04dd2b
Commit
1b04dd2b
authored
Aug 16, 2020
by
Hugo Hörnquist
Browse files
Broke out into own module
parents
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/init.pp
0 → 100644
View file @
1b04dd2b
class
ipoib
{
$packages
=
$facts
[
'os'
][
'family'
]
?
{
'RedHat'
=>
[
'infiniband-diags'
,
'libibverbs'
],
'Debian'
=>
[
'infiniband-diags'
,
'ibverbs-utils'
,
'ibverbs-providers'
,
'libibverbs1'
,
'librdmacm1'
],
}
package
{
$packages
:
ensure
=>
installed
,
}
->
file
{
'/etc/modules-load.d/ipoib.conf'
:
content
=>
"
mlx4_ib
rdma_ucm
ib_umad
ib_uverbs
ib_ipoib"
,
}
exec
{
'/usr/bin/systemctl restart systemd-modules-load'
:
subscribe
=>
File
[
'/etc/modules-load.d/ipoib.conf'
],
refreshonly
=>
true
,
}
}
manifests/interface.pp
0 → 100644
View file @
1b04dd2b
define
ipoib::interface
(
$interface
=
$name
,
$mtu
=
'65520'
,
$connected_mode
=
'yes'
,
$ipaddress
=
undef
,
$netmask
=
'255.255.255.0'
,
$gateway
=
undef
,
$domain
=
undef
,
$dns1
=
undef
,
$dns2
=
undef
,
$arp_ignore
=
'1'
,
)
{
require
::
ipoib
if
$ipaddress
==
undef
{
fail
(
'ipoib::interface requires an ip address'
)
}
sysctl
{
"net.ipv4.conf.
${interface}
.arp_ignore"
:
ensure
=>
present
,
value
=>
$arp_ignore
,
}
->
network::interface
{
$interface
:
ipaddress
=>
$ipaddress
,
netmask
=>
$netmask
,
gateway
=>
$gateway
,
type
=>
'InfiniBand'
,
domain
=>
$domain
,
dns1
=>
$dns1
,
dns2
=>
$dns2
,
options_extra_redhat
=>
{
'CONNECTED_MODE'
=>
$connected_mode
,
},
mtu
=>
$mtu
,
# Pre up for debian
pre_up
=>
[
'modprobe ib_umad'
,
'modprobe mlx4_ib'
,
'modprobe ib_ipoib'
,
'echo connected > /sys/class/net/ibo3/mode'
,
],
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment