cloud-mu 3.6.10 → 3.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Berksfile +2 -3
- data/Berksfile.lock +11 -14
- data/bin/mu-aws-setup +16 -4
- data/bin/mu-configure +2 -1
- data/cloud-mu.gemspec +2 -2
- data/cookbooks/mu-firewall/Berksfile +1 -1
- data/cookbooks/mu-firewall/attributes/default.rb +2 -2
- data/cookbooks/mu-firewall/metadata.rb +3 -3
- data/cookbooks/mu-firewall/recipes/default.rb +11 -2
- data/cookbooks/mu-master/Berksfile +1 -1
- data/cookbooks/mu-master/attributes/default.rb +14 -1
- data/cookbooks/mu-master/files/default/389ds-perl/ASDialogs.pm +173 -0
- data/cookbooks/mu-master/files/default/389ds-perl/AdminMigration.pm +569 -0
- data/cookbooks/mu-master/files/default/389ds-perl/AdminServer.pm +952 -0
- data/cookbooks/mu-master/files/default/389ds-perl/AdminUtil.pm +983 -0
- data/cookbooks/mu-master/files/default/389ds-perl/ConfigDSDialogs.pm +449 -0
- data/cookbooks/mu-master/files/default/389ds-perl/DSCreate.pm +1551 -0
- data/cookbooks/mu-master/files/default/389ds-perl/DSDialogs.pm +233 -0
- data/cookbooks/mu-master/files/default/389ds-perl/DSMigration.pm +1175 -0
- data/cookbooks/mu-master/files/default/389ds-perl/DSUpdate.pm +534 -0
- data/cookbooks/mu-master/files/default/389ds-perl/DSUpdateDialogs.pm +152 -0
- data/cookbooks/mu-master/files/default/389ds-perl/DSUtil.pm +1710 -0
- data/cookbooks/mu-master/files/default/389ds-perl/Dialog.pm +249 -0
- data/cookbooks/mu-master/files/default/389ds-perl/DialogManager.pm +212 -0
- data/cookbooks/mu-master/files/default/389ds-perl/FileConn.pm +461 -0
- data/cookbooks/mu-master/files/default/389ds-perl/Inf.pm +268 -0
- data/cookbooks/mu-master/files/default/389ds-perl/Migration.pm +327 -0
- data/cookbooks/mu-master/files/default/389ds-perl/RegDSDialogs.pm +94 -0
- data/cookbooks/mu-master/files/default/389ds-perl/Resource.pm +137 -0
- data/cookbooks/mu-master/files/default/389ds-perl/Setup.pm +240 -0
- data/cookbooks/mu-master/files/default/389ds-perl/SetupDialogs.pm +243 -0
- data/cookbooks/mu-master/files/default/389ds-perl/SetupLog.pm +82 -0
- data/cookbooks/mu-master/files/default/setCertName.ldif +4 -0
- data/cookbooks/mu-master/libraries/mu.rb +2 -2
- data/cookbooks/mu-master/metadata.rb +1 -1
- data/cookbooks/mu-master/recipes/389ds.rb +71 -32
- data/cookbooks/mu-master/recipes/basepackages.rb +5 -0
- data/cookbooks/mu-master/recipes/default.rb +16 -5
- data/cookbooks/mu-master/recipes/init.rb +36 -3
- data/cookbooks/mu-master/recipes/ssl-certs.rb +6 -0
- data/cookbooks/mu-master/recipes/sssd.rb +85 -62
- data/cookbooks/mu-master/recipes/update_nagios_only.rb +7 -1
- data/cookbooks/mu-master/templates/default/389-directory-setup.inf.erb +11 -26
- data/cookbooks/mu-master/templates/default/sssd.conf.erb +18 -8
- data/cookbooks/mu-tools/files/default/Mu_CA.pem +33 -0
- data/cookbooks/mu-tools/metadata.rb +0 -1
- data/cookbooks/mu-tools/recipes/set_local_fw.rb +7 -1
- data/cookbooks/mu-tools/templates/amazon/sshd_config.erb +5 -1
- data/cookbooks/nagios/CHANGELOG.md +679 -0
- data/cookbooks/nagios/LICENSE +201 -0
- data/cookbooks/nagios/README.md +340 -0
- data/cookbooks/nagios/attributes/config.rb +163 -0
- data/cookbooks/nagios/attributes/default.rb +204 -0
- data/cookbooks/nagios/libraries/base.rb +311 -0
- data/cookbooks/nagios/libraries/command.rb +68 -0
- data/cookbooks/nagios/libraries/contact.rb +229 -0
- data/cookbooks/nagios/libraries/contactgroup.rb +111 -0
- data/cookbooks/{firewall/recipes/disable_firewall.rb → nagios/libraries/custom_option.rb} +20 -7
- data/cookbooks/nagios/libraries/data_bag_helper.rb +23 -0
- data/cookbooks/nagios/libraries/default.rb +90 -0
- data/cookbooks/nagios/libraries/helpers.rb +229 -0
- data/cookbooks/nagios/libraries/host.rb +410 -0
- data/cookbooks/nagios/libraries/hostdependency.rb +178 -0
- data/cookbooks/nagios/libraries/hostescalation.rb +170 -0
- data/cookbooks/nagios/libraries/hostgroup.rb +117 -0
- data/cookbooks/nagios/libraries/nagios.rb +277 -0
- data/cookbooks/nagios/libraries/resource.rb +59 -0
- data/cookbooks/nagios/libraries/service.rb +449 -0
- data/cookbooks/nagios/libraries/servicedependency.rb +213 -0
- data/cookbooks/nagios/libraries/serviceescalation.rb +193 -0
- data/cookbooks/nagios/libraries/servicegroup.rb +142 -0
- data/cookbooks/nagios/libraries/timeperiod.rb +159 -0
- data/cookbooks/nagios/libraries/users_helper.rb +54 -0
- data/cookbooks/nagios/metadata.json +44 -0
- data/cookbooks/nagios/metadata.rb +22 -0
- data/cookbooks/nagios/recipes/_load_databag_config.rb +153 -0
- data/cookbooks/nagios/recipes/_load_default_config.rb +241 -0
- data/cookbooks/nagios/recipes/apache.rb +114 -0
- data/cookbooks/nagios/recipes/default.rb +41 -0
- data/cookbooks/nagios/recipes/nginx.rb +114 -0
- data/cookbooks/nagios/recipes/pagerduty.rb +95 -0
- data/cookbooks/nagios/recipes/server.rb +182 -0
- data/cookbooks/nagios/recipes/server_package.rb +85 -0
- data/cookbooks/nagios/recipes/server_source.rb +137 -0
- data/cookbooks/nagios/resources/command.rb +34 -0
- data/cookbooks/nagios/resources/conf.rb +52 -0
- data/cookbooks/nagios/resources/contact.rb +34 -0
- data/cookbooks/nagios/resources/contactgroup.rb +35 -0
- data/cookbooks/nagios/resources/host.rb +35 -0
- data/cookbooks/nagios/resources/hostdependency.rb +35 -0
- data/cookbooks/nagios/resources/hostescalation.rb +36 -0
- data/cookbooks/nagios/resources/hostgroup.rb +35 -0
- data/cookbooks/nagios/resources/resource.rb +34 -0
- data/cookbooks/nagios/resources/service.rb +35 -0
- data/cookbooks/nagios/resources/servicedependency.rb +35 -0
- data/cookbooks/nagios/resources/serviceescalation.rb +35 -0
- data/cookbooks/nagios/resources/servicegroup.rb +35 -0
- data/cookbooks/nagios/resources/timeperiod.rb +35 -0
- data/cookbooks/nagios/templates/apache2.conf.erb +102 -0
- data/cookbooks/nagios/templates/cgi.cfg.erb +266 -0
- data/cookbooks/nagios/templates/commands.cfg.erb +13 -0
- data/cookbooks/nagios/templates/contacts.cfg.erb +37 -0
- data/cookbooks/nagios/templates/hostgroups.cfg.erb +25 -0
- data/cookbooks/nagios/templates/hosts.cfg.erb +15 -0
- data/cookbooks/nagios/templates/htpasswd.users.erb +6 -0
- data/cookbooks/nagios/templates/nagios.cfg.erb +22 -0
- data/cookbooks/nagios/templates/nginx.conf.erb +80 -0
- data/cookbooks/nagios/templates/pagerduty.cgi.erb +185 -0
- data/cookbooks/nagios/templates/resource.cfg.erb +27 -0
- data/cookbooks/nagios/templates/servicedependencies.cfg.erb +15 -0
- data/cookbooks/nagios/templates/servicegroups.cfg.erb +14 -0
- data/cookbooks/nagios/templates/services.cfg.erb +14 -0
- data/cookbooks/nagios/templates/spawn-fcgi.erb +10 -0
- data/cookbooks/nagios/templates/templates.cfg.erb +31 -0
- data/cookbooks/nagios/templates/timeperiods.cfg.erb +13 -0
- data/extras/platform_berksfile_base +3 -3
- data/extras/python_rpm/build.sh +4 -4
- data/extras/python_rpm/muthon.spec +2 -4
- data/extras/vault_tools/export_vaults.sh +11 -1
- data/install/installer +1 -1
- data/modules/mu/kittens.rb +27523 -0
- data/modules/mu/master/ldap.rb +48 -31
- data/modules/mu/master.rb +69 -0
- data/modules/mu/mu.yaml.rb +351 -0
- data/modules/mu/providers/aws/firewall_rule.rb +3 -1
- data/modules/mu/providers/aws.rb +11 -5
- data/modules/mu.rb +5 -4
- metadata +99 -48
- data/cookbooks/firewall/CHANGELOG.md +0 -488
- data/cookbooks/firewall/LICENSE +0 -202
- data/cookbooks/firewall/README.md +0 -366
- data/cookbooks/firewall/TODO.md +0 -6
- data/cookbooks/firewall/attributes/default.rb +0 -5
- data/cookbooks/firewall/attributes/firewalld.rb +0 -8
- data/cookbooks/firewall/attributes/iptables.rb +0 -17
- data/cookbooks/firewall/attributes/ufw.rb +0 -12
- data/cookbooks/firewall/attributes/windows.rb +0 -8
- data/cookbooks/firewall/libraries/helpers.rb +0 -105
- data/cookbooks/firewall/libraries/helpers_firewalld.rb +0 -116
- data/cookbooks/firewall/libraries/helpers_firewalld_dbus.rb +0 -72
- data/cookbooks/firewall/libraries/helpers_iptables.rb +0 -112
- data/cookbooks/firewall/libraries/helpers_nftables.rb +0 -170
- data/cookbooks/firewall/libraries/helpers_ufw.rb +0 -142
- data/cookbooks/firewall/libraries/helpers_windows.rb +0 -129
- data/cookbooks/firewall/libraries/provider_firewall_firewalld.rb +0 -179
- data/cookbooks/firewall/libraries/provider_firewall_iptables.rb +0 -171
- data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu.rb +0 -200
- data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu1404.rb +0 -200
- data/cookbooks/firewall/libraries/provider_firewall_rule.rb +0 -34
- data/cookbooks/firewall/libraries/provider_firewall_ufw.rb +0 -138
- data/cookbooks/firewall/libraries/provider_firewall_windows.rb +0 -126
- data/cookbooks/firewall/libraries/resource_firewall.rb +0 -26
- data/cookbooks/firewall/libraries/resource_firewall_rule.rb +0 -52
- data/cookbooks/firewall/metadata.json +0 -40
- data/cookbooks/firewall/metadata.rb +0 -15
- data/cookbooks/firewall/recipes/default.rb +0 -76
- data/cookbooks/firewall/recipes/firewalld.rb +0 -87
- data/cookbooks/firewall/resources/firewalld.rb +0 -28
- data/cookbooks/firewall/resources/firewalld_config.rb +0 -39
- data/cookbooks/firewall/resources/firewalld_helpers.rb +0 -106
- data/cookbooks/firewall/resources/firewalld_icmptype.rb +0 -88
- data/cookbooks/firewall/resources/firewalld_ipset.rb +0 -104
- data/cookbooks/firewall/resources/firewalld_policy.rb +0 -115
- data/cookbooks/firewall/resources/firewalld_service.rb +0 -98
- data/cookbooks/firewall/resources/firewalld_zone.rb +0 -118
- data/cookbooks/firewall/resources/nftables.rb +0 -71
- data/cookbooks/firewall/resources/nftables_rule.rb +0 -113
- data/cookbooks/firewall/templates/default/ufw/default.erb +0 -13
- /data/cookbooks/{firewall → nagios}/chefignore +0 -0
- /data/cookbooks/{firewall → nagios}/renovate.json +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b68d83dd2e0b863871189a2d9468dd2ac80c95dd1a673dd1e08b68a7e6c3d551
|
4
|
+
data.tar.gz: 50b026f0cdf80c07842711db06e85b6bfb42953c05043ac1558e70cfccda13a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71b4a59e6221377619473dce422a1ba5546a66d27e50ec31138de6a6306fceb7c2ad32386156190d6da8a4a06d07bf815adbf580b104872a3030ec1a6c1fd156
|
7
|
+
data.tar.gz: a6169fc63299885e53800021fb75c4771d8d6b84dec76d1ec1e562e94c8a95d4ff3345cc3827cc1fc1f3c489fbe15d7cfdaca151070327df1906942763efe234
|
data/Berksfile
CHANGED
@@ -12,9 +12,8 @@ cookbook 'mu-mongo'
|
|
12
12
|
cookbook 'mu-openvpn'
|
13
13
|
cookbook 'mu-tools'
|
14
14
|
cookbook 'mu-utility'
|
15
|
-
cookbook 'nagios', '~>
|
16
|
-
#cookbook 'mu-nagios'
|
17
|
-
cookbook 'firewall', path: 'cookbooks/firewall'
|
15
|
+
cookbook 'nagios', '~> 12.1.201'
|
16
|
+
#cookbook 'mu-nagios'
|
18
17
|
cookbook 'chocolatey'
|
19
18
|
cookbook 'seven_zip', '< 4.0'
|
20
19
|
cookbook 'nginx', '< 12'
|
data/Berksfile.lock
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
DEPENDENCIES
|
2
2
|
awscli
|
3
3
|
chocolatey
|
4
|
-
firewall
|
5
|
-
path: cookbooks/firewall
|
6
4
|
mu-activedirectory
|
7
5
|
mu-firewall
|
8
6
|
mu-glusterfs
|
@@ -12,14 +10,14 @@ DEPENDENCIES
|
|
12
10
|
mu-splunk
|
13
11
|
mu-tools
|
14
12
|
mu-utility
|
15
|
-
nagios (~>
|
13
|
+
nagios (~> 12.1.201)
|
16
14
|
nginx (< 12.0.0)
|
17
15
|
seven_zip (< 4.0.0)
|
18
16
|
|
19
17
|
GRAPH
|
20
18
|
apache2 (9.0.6)
|
21
19
|
yum-epel (>= 0.0.0)
|
22
|
-
apt (7.
|
20
|
+
apt (7.6.0)
|
23
21
|
awscli (1.1.2)
|
24
22
|
python (~> 1.4)
|
25
23
|
bind (2.2.1)
|
@@ -33,8 +31,8 @@ GRAPH
|
|
33
31
|
cpan (0.1.0)
|
34
32
|
database (6.1.1)
|
35
33
|
postgresql (>= 1.0.0)
|
36
|
-
firewall (
|
37
|
-
homebrew (
|
34
|
+
firewall (7.0.1)
|
35
|
+
homebrew (6.0.1)
|
38
36
|
hostsfile (3.0.1)
|
39
37
|
java (2.2.1)
|
40
38
|
homebrew (>= 0.0.0)
|
@@ -50,8 +48,8 @@ GRAPH
|
|
50
48
|
chef-vault (~> 3.1.1)
|
51
49
|
windows (~> 5.1.1)
|
52
50
|
yum-epel (~> 5.0.8)
|
53
|
-
mu-firewall (0.1.
|
54
|
-
firewall (~>
|
51
|
+
mu-firewall (0.1.4)
|
52
|
+
firewall (~> 7.0.1)
|
55
53
|
mu-glusterfs (0.1.0)
|
56
54
|
mu-firewall (>= 0.0.0)
|
57
55
|
yum (~> 5.1.0)
|
@@ -68,7 +66,7 @@ GRAPH
|
|
68
66
|
mu-utility (>= 0.0.0)
|
69
67
|
nagios (>= 0.0.0)
|
70
68
|
nrpe (~> 2.0.3)
|
71
|
-
postfix (~>
|
69
|
+
postfix (~> 6.0.29)
|
72
70
|
s3fs (>= 0.0.0)
|
73
71
|
mu-mongo (0.5.0)
|
74
72
|
chef-vault (~> 3.1.1)
|
@@ -83,7 +81,6 @@ GRAPH
|
|
83
81
|
chef-vault (~> 3.1.1)
|
84
82
|
chocolatey (>= 0.0.0)
|
85
83
|
database (~> 6.1.1)
|
86
|
-
firewall (>= 0.0.0)
|
87
84
|
java (~> 2.2.0)
|
88
85
|
mu-activedirectory (>= 0.0.0)
|
89
86
|
mu-firewall (>= 0.0.0)
|
@@ -98,11 +95,11 @@ GRAPH
|
|
98
95
|
mu-utility (0.6.0)
|
99
96
|
mu-firewall (>= 0.0.0)
|
100
97
|
windows (~> 5.1.1)
|
101
|
-
nagios (
|
98
|
+
nagios (12.1.201)
|
102
99
|
apache2 (>= 9.0)
|
103
100
|
nginx (>= 11.2)
|
104
101
|
nrpe (>= 0.0.0)
|
105
|
-
php (>=
|
102
|
+
php (>= 10.0)
|
106
103
|
yum-epel (>= 0.0.0)
|
107
104
|
zap (>= 0.6.0)
|
108
105
|
nginx (11.5.3)
|
@@ -116,8 +113,8 @@ GRAPH
|
|
116
113
|
cpan (>= 0.0.0)
|
117
114
|
php (>= 0.0.0)
|
118
115
|
packagecloud (2.0.8)
|
119
|
-
php (10.2.
|
120
|
-
postfix (
|
116
|
+
php (10.2.4)
|
117
|
+
postfix (6.0.29)
|
121
118
|
postgresql (7.1.9)
|
122
119
|
python (1.4.6)
|
123
120
|
build-essential (>= 0.0.0)
|
data/bin/mu-aws-setup
CHANGED
@@ -167,11 +167,23 @@ if $opts[:sg]
|
|
167
167
|
if !admin_sg.nil?
|
168
168
|
MU.log "Using an existing Security Group, #{admin_sg}, already associated with this Mu server."
|
169
169
|
open_ports.each { |port|
|
170
|
-
|
170
|
+
begin
|
171
|
+
admin_sg.addRule(ranges, port: port, comment: "Mu Master service access")
|
172
|
+
rescue Aws::EC2::Errors::InvalidPermissionDuplicate
|
173
|
+
end
|
171
174
|
}
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
+
begin
|
176
|
+
admin_sg.addRule(["#{preferred_ip}/32"], port: 22, comment: "Mu Master service access")
|
177
|
+
rescue Aws::EC2::Errors::InvalidPermissionDuplicate
|
178
|
+
end
|
179
|
+
begin
|
180
|
+
admin_sg.addRule(["0.0.0.0/0"], port: 80, comment: "Mu Master service access")
|
181
|
+
rescue Aws::EC2::Errors::InvalidPermissionDuplicate
|
182
|
+
end
|
183
|
+
begin
|
184
|
+
admin_sg.addRule([admin_sg.cloud_id], comment: "Mu Master service access")
|
185
|
+
rescue Aws::EC2::Errors::InvalidPermissionDuplicate
|
186
|
+
end
|
175
187
|
else
|
176
188
|
cfg = {
|
177
189
|
"name" => "Mu Master",
|
data/bin/mu-configure
CHANGED
@@ -39,6 +39,7 @@ CLEAN_ENV_STR = CLEAN_ENV.keys.map { |k|
|
|
39
39
|
CHEF_CLIENT="/opt/chef/bin/chef-client"
|
40
40
|
CHEF_CTL="env -i PATH=/opt/opscode/bin:/usr/bin:/bin chef-server-ctl"
|
41
41
|
GIT_PATTERN = /(((git|ssh|http(s)?)|(git@[\w\.]+))(:(\/\/)?))?([\w\.@\:\/\-~]+)(\.git)?(\/)?/
|
42
|
+
ENV['CHEF_LICENSE'] = "accept"
|
42
43
|
|
43
44
|
|
44
45
|
#def _x(cmd)
|
@@ -1243,7 +1244,7 @@ ssl_verify_mode :verify_none
|
|
1243
1244
|
"user" => "CN=mu_join_creds,#{$MU_CFG["ldap"]['user_ou']}"
|
1244
1245
|
},
|
1245
1246
|
"cfg_directory_adm" => {
|
1246
|
-
"user" => "
|
1247
|
+
"user" => "cn=Directory Manager"
|
1247
1248
|
},
|
1248
1249
|
"root_dn_user" => {
|
1249
1250
|
"user" => "CN=root_dn_user"
|
data/cloud-mu.gemspec
CHANGED
@@ -17,8 +17,8 @@ end
|
|
17
17
|
|
18
18
|
Gem::Specification.new do |s|
|
19
19
|
s.name = 'cloud-mu'
|
20
|
-
s.version = '3.6.
|
21
|
-
s.date = '
|
20
|
+
s.version = '3.6.11'
|
21
|
+
s.date = '2025-04-27'
|
22
22
|
s.require_paths = ['modules']
|
23
23
|
s.required_ruby_version = '>= 3'
|
24
24
|
s.summary = "The eGTLabs Mu toolkit for unified cloud deployments"
|
@@ -1,5 +1,5 @@
|
|
1
|
-
default['firewall']['allow_ssh'] = true
|
2
1
|
default['firewall']['firewalld']['permanent'] = true
|
3
2
|
default['firewall']['ipv6_enabled'] = false
|
4
3
|
default['firewall']['allow_loopback'] = true
|
5
|
-
force_default['firewall']['allow_established'] = true
|
4
|
+
force_default['firewall']['allow_established'] = true
|
5
|
+
force_default['firewall']['allow_ssh'] = true
|
@@ -7,10 +7,10 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
|
7
7
|
source_url 'https://github.com/cloudamatic/mu'
|
8
8
|
issues_url 'https://github.com/cloudamatic/mu/issues'
|
9
9
|
chef_version '>= 12.1' if respond_to?(:chef_version)
|
10
|
-
version '0.1.
|
10
|
+
version '0.1.4'
|
11
11
|
|
12
|
-
%w( amazon centos redhat
|
12
|
+
%w( amazon centos redhat ).each do |os|
|
13
13
|
supports os
|
14
14
|
end
|
15
15
|
|
16
|
-
depends 'firewall', '~>
|
16
|
+
depends 'firewall', '~> 7.0.1'
|
@@ -2,9 +2,18 @@
|
|
2
2
|
# Cookbook Name:: mu-firewall
|
3
3
|
# Recipe:: default
|
4
4
|
#
|
5
|
-
# Copyright
|
5
|
+
# Copyright 2025, eGlobalTech
|
6
6
|
#
|
7
7
|
# All rights reserved - Do Not Redistribute
|
8
8
|
#
|
9
9
|
|
10
|
-
|
10
|
+
if node['platform_family'] != "amazon" or node['platform_version'].to_i >= 2023
|
11
|
+
|
12
|
+
# The firewall cookbook needs this, and its chef_gem resource doesn't work
|
13
|
+
# for some reason.
|
14
|
+
execute "env -i /opt/chef/embedded/bin/gem install ruby-dbus" do
|
15
|
+
compile_time true
|
16
|
+
end
|
17
|
+
|
18
|
+
include_recipe 'firewall'
|
19
|
+
end
|
@@ -13,7 +13,7 @@ cookbook 's3fs'
|
|
13
13
|
# Supermarket Cookbooks
|
14
14
|
cookbook 'nagios'
|
15
15
|
cookbook 'nrpe', '~> 2.0.3'
|
16
|
-
cookbook 'postfix', '~>
|
16
|
+
cookbook 'postfix', '~> 6.0.29'
|
17
17
|
cookbook 'bind', '~> 2.2.0'
|
18
18
|
cookbook 'bind9-ng', '~> 0.1.0'
|
19
19
|
#cookbook 'vault-cluster', '~> 2.1.0'
|
@@ -21,14 +21,27 @@ default['apache']['mod_ssl']['directives']['SSLProtocol'] = "all -SSLv2 -SSLv3"
|
|
21
21
|
default['apache']['contact'] = $MU_CFG['mu_admin_email']
|
22
22
|
default['apache']['traceenable'] = 'Off'
|
23
23
|
|
24
|
+
default['apache']['version'] = "2.4"
|
24
25
|
default["apache"]["listen"] = ["*:80", "*:443", "*:8443"]
|
25
26
|
default['apache']['user'] = "apache"
|
26
27
|
default['apache']['group'] = "apache"
|
27
28
|
|
28
|
-
|
29
29
|
override["nagios"]["http_port"] = 8443
|
30
30
|
default['nagios']['enable_ssl'] = true
|
31
31
|
|
32
|
+
# The brain-dead Nagios cookbook configures itself with a checksum and version
|
33
|
+
# flag for 4.1.1, then proceeds to concoct a URL for 4.4.6. Help it.
|
34
|
+
default['nagios']['server']['source_url'] = "https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.5.8.tar.gz"
|
35
|
+
default['nagios']['server']['checksum'] = "66b73bfc148c0763a64bbf849595d818"
|
36
|
+
default['nagios']['server']['version'] = "66b73bfc148c0763a64bbf849595d818"
|
37
|
+
|
38
|
+
|
39
|
+
if node['platform_family'] == "amazon" and node['platform_version'].split('.')[0] == "2023"
|
40
|
+
default['nagios']['php_packages'] = ["php8.3", "php8.3-devel", "php8.3-cli", "php8.3-modphp", "php-pear"]
|
41
|
+
default['nagios']['php_gd_package'] = "php8.3-gd"
|
42
|
+
default['nagios']['server']['dependencies'] = ["openssl-devel", "mailx", "gd-devel", "tar", "unzip"]
|
43
|
+
end
|
44
|
+
|
32
45
|
# We use key/value tags like sensible people, but Chef expects an array and
|
33
46
|
# flattens the whole mess out, hence the weird form here.
|
34
47
|
default['nagios']['exclude_tag_host'] = [ [ "nomonitor", true ] ]
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# BEGIN COPYRIGHT BLOCK
|
2
|
+
# This Program is free software; you can redistribute it and/or modify it under
|
3
|
+
# the terms of the GNU General Public License as published by the Free Software
|
4
|
+
# Foundation; version 2 of the License.
|
5
|
+
#
|
6
|
+
# This Program is distributed in the hope that it will be useful, but WITHOUT
|
7
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
8
|
+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
9
|
+
#
|
10
|
+
# You should have received a copy of the GNU General Public License along with
|
11
|
+
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
12
|
+
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
13
|
+
#
|
14
|
+
# Copyright (C) 2007 Red Hat, Inc.
|
15
|
+
# All rights reserved.
|
16
|
+
# END COPYRIGHT BLOCK
|
17
|
+
#
|
18
|
+
|
19
|
+
package ASDialogs;
|
20
|
+
|
21
|
+
use strict;
|
22
|
+
|
23
|
+
use DialogManager;
|
24
|
+
use Setup;
|
25
|
+
use Dialog;
|
26
|
+
use DSUtil;
|
27
|
+
|
28
|
+
my $asserveradmin = new Dialog (
|
29
|
+
$SILENT, # hidden
|
30
|
+
'none',
|
31
|
+
sub {
|
32
|
+
my $self = shift;
|
33
|
+
my $id = $self->{manager}->{inf}->{admin}->{ServerAdminID} ||
|
34
|
+
$self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID};
|
35
|
+
if (isValidDN($id)) {
|
36
|
+
$id =~ s/^(.*)=.*/$1/;
|
37
|
+
}
|
38
|
+
$self->{manager}->{inf}->{admin}->{ServerAdminID} = $id;
|
39
|
+
my $pwd = $self->{manager}->{inf}->{admin}->{ServerAdminPwd} ||
|
40
|
+
$self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd};
|
41
|
+
$self->{manager}->{inf}->{admin}->{ServerAdminPwd} = $pwd;
|
42
|
+
return $id;
|
43
|
+
},
|
44
|
+
sub {
|
45
|
+
return $DialogManager::NEXT;
|
46
|
+
},
|
47
|
+
['none']
|
48
|
+
);
|
49
|
+
|
50
|
+
my $asport = new Dialog (
|
51
|
+
$TYPICAL,
|
52
|
+
'dialog_asport_text',
|
53
|
+
sub {
|
54
|
+
my $self = shift;
|
55
|
+
my $port = $self->{manager}->{inf}->{admin}->{Port};
|
56
|
+
if (!defined($port)) {
|
57
|
+
$port = 9830;
|
58
|
+
$self->{manager}->{setup}->{asorigport} = $port;
|
59
|
+
}
|
60
|
+
if (!$self->{manager}->{setup}->{reconfigas}) {
|
61
|
+
if (!portAvailable($port)) {
|
62
|
+
$port = getAvailablePort();
|
63
|
+
}
|
64
|
+
}
|
65
|
+
return $port;
|
66
|
+
},
|
67
|
+
sub {
|
68
|
+
my $self = shift;
|
69
|
+
my $ans = shift;
|
70
|
+
my $res = $DialogManager::SAME;
|
71
|
+
my $reconf = $self->{manager}->{setup}->{reconfigas};
|
72
|
+
if ($ans !~ /\d+/) {
|
73
|
+
$self->{manager}->alert("dialog_asport_error", $ans);
|
74
|
+
} elsif (!$reconf && !portAvailable($ans)) {
|
75
|
+
$self->{manager}->alert("dialog_asport_error", $ans);
|
76
|
+
} else {
|
77
|
+
$res = $DialogManager::NEXT;
|
78
|
+
$self->{manager}->{inf}->{admin}->{Port} = $ans;
|
79
|
+
}
|
80
|
+
return $res;
|
81
|
+
},
|
82
|
+
['dialog_asport_prompt']
|
83
|
+
);
|
84
|
+
|
85
|
+
my $ashostip = new Dialog (
|
86
|
+
$CUSTOM,
|
87
|
+
'dialog_ashostip_text',
|
88
|
+
sub {
|
89
|
+
my $self = shift;
|
90
|
+
if (!defined($self->{manager}->{inf}->{admin}->{ServerIpAddress})) {
|
91
|
+
$self->{manager}->{inf}->{admin}->{ServerIpAddress} = "0.0.0.0";
|
92
|
+
}
|
93
|
+
return $self->{manager}->{inf}->{admin}->{ServerIpAddress};
|
94
|
+
},
|
95
|
+
sub {
|
96
|
+
my $self = shift;
|
97
|
+
my $ans = shift;
|
98
|
+
if ($ans && (length($ans) > 0)) {
|
99
|
+
$self->{manager}->{inf}->{admin}->{ServerIpAddress} = $ans;
|
100
|
+
} elsif (exists($self->{manager}->{inf}->{admin}->{ServerIpAddress})) {
|
101
|
+
delete $self->{manager}->{inf}->{admin}->{ServerIpAddress};
|
102
|
+
}
|
103
|
+
return $DialogManager::NEXT;
|
104
|
+
},
|
105
|
+
['dialog_ashostip_prompt']
|
106
|
+
);
|
107
|
+
|
108
|
+
# must verify that the user or uid specified by the user to run the server as
|
109
|
+
# is a valid uid
|
110
|
+
sub verifyUserChoice {
|
111
|
+
my $self = shift;
|
112
|
+
my $ans = shift;
|
113
|
+
my $res = $DialogManager::NEXT;
|
114
|
+
# convert numeric uid to string
|
115
|
+
my $strans = $ans;
|
116
|
+
if ($ans =~ /^\d/) { # numeric - convert to string
|
117
|
+
$strans = getpwuid $ans;
|
118
|
+
if (!$strans) {
|
119
|
+
$self->{manager}->alert("dialog_assysuser_error", $ans);
|
120
|
+
return $DialogManager::SAME;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
if ($> != 0) { # if not root, the user must be our uid
|
124
|
+
my $username = getLogin;
|
125
|
+
if ($strans ne $username) {
|
126
|
+
$self->{manager}->alert("dialog_assysuser_must_be_same", $username);
|
127
|
+
return $DialogManager::SAME;
|
128
|
+
}
|
129
|
+
} else { # user is root - verify id
|
130
|
+
my $nuid = getpwnam $strans;
|
131
|
+
if (!defined($nuid)) {
|
132
|
+
$self->{manager}->alert("dialog_assysuser_error", $ans);
|
133
|
+
return $DialogManager::SAME;
|
134
|
+
}
|
135
|
+
if (!$nuid) {
|
136
|
+
$self->{manager}->alert("dialog_assysuser_root_warning");
|
137
|
+
}
|
138
|
+
}
|
139
|
+
$self->{manager}->{inf}->{admin}->{SysUser} = $ans;
|
140
|
+
return $res;
|
141
|
+
}
|
142
|
+
|
143
|
+
my $assysuser = new Dialog (
|
144
|
+
$CUSTOM,
|
145
|
+
'dialog_assysuser_text',
|
146
|
+
sub {
|
147
|
+
my $self = shift;
|
148
|
+
my $user = $self->{manager}->{inf}->{admin}->{SysUser};
|
149
|
+
if (!defined($user)) {
|
150
|
+
$user = $self->{manager}->{inf}->{General}->{SuiteSpotUserID};
|
151
|
+
}
|
152
|
+
if (!defined($user)) {
|
153
|
+
if ($> == 0) { # if root, use the default user
|
154
|
+
$user = "nobody";
|
155
|
+
} else { # if not root, use the user's uid
|
156
|
+
$user = getLogin;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
return $user;
|
160
|
+
},
|
161
|
+
sub {
|
162
|
+
my $self = shift;
|
163
|
+
my $ans = shift;
|
164
|
+
return verifyUserChoice($self, $ans);
|
165
|
+
},
|
166
|
+
['dialog_assysuser_prompt']
|
167
|
+
);
|
168
|
+
|
169
|
+
sub getDialogs {
|
170
|
+
return ($asserveradmin, $asport, $ashostip, $assysuser);
|
171
|
+
}
|
172
|
+
|
173
|
+
1;
|