This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
/
init.pp
94 lines (89 loc) · 3.85 KB
/
init.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
class hardware {
include config
# SeaMicro nodes can start up with incorrect time - see bug 789064
if ($::manufacturer == "SeaMicro" and $::productname == "SM10000-XE") {
# only known to work on CentOS so far, although it should work on any Linux
if ($::operatingsystem == "CentOS") {
file {
"/etc/e2fsck.conf":
source => "puppet:///modules/hardware/seamicro-e2fsck.conf";
}
}
}
# Nodes running IPMI-compliant hardware should install OpenIPMI
if (($::manufacturer == "HP" and $::productname =~ /ProLiant/) or
($::boardmanufacturer == "Supermicro" and $::boardproductname == "X8SIL") or # ix700C
($::boardmanufacturer == "Supermicro" and $::boardproductname == "X8SIT")) { # ix21x4
if ($kernel == "Linux") {
include hardware::ipmitool
}
}
if (($::boardmanufacturer == "Supermicro" and $::boardproductname == "X8SIL") or # ix700C
($::boardmanufacturer == "Supermicro" and $::boardproductname == "X8SIT")) { # ix21x4
if ($kernel == "Linux") {
# disable some broken NIC features
include tweaks::i82574l_aspm
}
}
# OK, so it's not strictly "hardware", but stlil..
if ($::virtual == "vmware") {
if ($kernel == "Linux") {
# kernels should use clocksource=pit to get proper timing info
# and, of course, this is different between RHEL-based and Ubuntu
# systems!
case $operatingsystem {
CentOS: {
if ($config::vmwaretools_version) {
class {
'vmwaretools':
version => $config::vmwaretools_version,
archive_md5 => $config::vmwaretools_md5,
archive_url => "http://${config::data_server}/repos/private/vmware";
}
}
augeas {
"vmware-clocksource":
context => "/files/etc/grub.conf",
changes => [
"set title[1]/kernel/clocksource pit",
];
}
}
Ubuntu: {
augeas {
"vmware-clocksource":
context => "/files/etc/default/grub",
changes => [
"set GRUB_CMDLINE_EXTRA clocksource=pit"
];
}
case $::operatingsystemrelease {
12.04,14.04: {
if ($config::vmwaretools_version) {
class {
'vmwaretools':
version => $config::vmwaretools_version,
archive_md5 => $config::vmwaretools_md5,
archive_url => "http://${config::data_server}/repos/private/vmware";
}
}
}
16.04: {
class {'packages::open_vm_tools': }
}
default: {
fail("Unrecognized Ubuntu version $::operatingsystemrelease")
}
}
}
}
}
}
if ($::operatingsystem == "Windows") {
include hardware::hddoff
include hardware::highperformance
}
}