54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# File 'manifests/init.pp', line 54
class mofed (
Boolean $manage_repo = true,
Optional[String] $repo_baseurl = undef,
Enum['1','0'] $repo_gpgcheck = '1',
Optional[String] $repo_gpgkey = undef,
Optional[String] $repo_exclude = undef,
Optional[String] $repo_priority = undef,
Boolean $manage_packages = true,
String $package_ensure = 'present',
String $package_name = 'mlnx-ofed-basic',
Optional[Array] $extra_packages = undef,
Boolean $extra_packages_hiera_merge = false,
Boolean $manage_service = true,
Boolean $restart_service = false,
String $openibd_service_name = 'openibd',
String $openibd_service_ensure = 'running',
Boolean $openibd_service_enable = true,
Boolean $openibd_service_hasstatus = true,
Boolean $openibd_service_hasrestart = true,
Boolean $manage_config = true,
Stdlib::Absolutepath $openib_config_path = '/etc/infiniband/openib.conf',
Hash $openib_shellvars = {},
Hash $interfaces = {}
) {
$osfamily = $facts.dig('os', 'family')
$osmajor = $facts.dig('os', 'release', 'major')
$supported = ['RedHat-6','RedHat-7','RedHat-8']
$os = "${osfamily}-${osmajor}"
if ! ($os in $supported) {
fail("Unsupported OS: ${osfamily}, module ${module_name} only supports RedHat 6, 7, and 8")
}
if $restart_service {
$openib_shellvar_notify = Service['openibd']
} else {
$openib_shellvar_notify = undef
}
contain mofed::repo
contain mofed::install
contain mofed::config
contain mofed::service
Class['mofed::repo']
-> Class['mofed::install']
-> Class['mofed::config']
-> Class['mofed::service']
create_resources('mofed::interface', $interfaces)
}
|