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
|
# File 'manifests/init.pp', line 21
class cloud(
$rhn_registration = $os_params::rhn_registration,
) {
if ! ($::osfamily in [ 'RedHat', 'Debian' ]) {
fail("OS family unsuppored yet (${::osfamily}), module puppet-openstack-cloud only support RedHat or Debian")
}
# motd
file
{
'/etc/motd':
ensure => file,
mode => '0644',
content => "
############################################################################
# eNovance IT Operations #
############################################################################
# #
# *** RESTRICTED ACCESS *** #
# Only the authorized users may access this system. #
# Any attempted unauthorized access or any action affecting the computer #
# system of eNovance is punishable under articles 323-1 to 323-7 of #
# French criminal law. #
# #
############################################################################
This node is under the control of Puppet ${::puppetversion}.
";
}
# DNS
class { 'dnsclient':
nameservers => $os_params::dns_ips,
options => 'UNSET',
search => $os_params::site_domain,
domain => $os_params::site_domain,
}
# NTP
class { 'ntp': servers => $::os_params::ntp_servers }
# Strong root password for all servers
user { 'root':
ensure => 'present',
gid => '0',
password => $os_params::root_password,
uid => '0',
}
$cron_service_name = $::osfamily ? {
'RedHat' => 'crond',
default => 'cron',
}
service { 'cron':
ensure => running,
name => $cron_service_name,
enable => true
}
if $::osfamily == 'RedHat' and $rhn_registration {
create_resources('rhn_register', {
"rhn-${::hostname}" => $rhn_registration
} )
}
}
|