cloud-mu 3.6.10 → 3.6.12
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 +3 -3
- 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 -68
- 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
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: host
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Host.create(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('host', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/host'
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: hostdependency
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Hostdependency.create(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('hostdependency', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/hostdependency'
|
35
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: hostescalation
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Hostescalation.new(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
Nagios.instance.push(o)
|
28
|
+
end
|
29
|
+
|
30
|
+
action :delete do
|
31
|
+
Nagios.instance.delete('hostescalation', new_resource.name)
|
32
|
+
end
|
33
|
+
|
34
|
+
action_class do
|
35
|
+
require_relative '../libraries/hostescalation'
|
36
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: hostgroup
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Hostgroup.create(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('hostgroup', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/hostgroup'
|
35
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: resource
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
21
|
+
unified_mode true
|
22
|
+
|
23
|
+
action :create do
|
24
|
+
o = Nagios::Resource.create(new_resource.name)
|
25
|
+
o.import(new_resource.options)
|
26
|
+
end
|
27
|
+
|
28
|
+
action :delete do
|
29
|
+
Nagios.instance.delete('resource', new_resource.name)
|
30
|
+
end
|
31
|
+
|
32
|
+
action_class do
|
33
|
+
require_relative '../libraries/resource'
|
34
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: service
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Service.create(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('service', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/service'
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: servicedependency
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Servicedependency.create(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('servicedependency', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/servicedependency'
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: serviceescalation
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
21
|
+
unified_mode true
|
22
|
+
|
23
|
+
action :create do
|
24
|
+
o = Nagios::Serviceescalation.new(new_resource.name)
|
25
|
+
o.import(new_resource.options)
|
26
|
+
Nagios.instance.push(o)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('serviceescalation', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/serviceescalation'
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: nagios
|
4
|
+
# Resource:: servicegroup
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Servicegroup.create(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('servicegroup', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/servicegroup'
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sander Botman <sbotman@schubergphilis.com>
|
3
|
+
# Cookbook:: : nagios
|
4
|
+
# Resource:: : timeperiod
|
5
|
+
#
|
6
|
+
# Copyright:: 2015, Sander Botman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
property :options, [Hash, Chef::DataBagItem], default: {}
|
22
|
+
unified_mode true
|
23
|
+
|
24
|
+
action :create do
|
25
|
+
o = Nagios::Timeperiod.create(new_resource.name)
|
26
|
+
o.import(new_resource.options)
|
27
|
+
end
|
28
|
+
|
29
|
+
action :delete do
|
30
|
+
Nagios.instance.delete('timeperiod', new_resource.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
action_class do
|
34
|
+
require_relative '../libraries/timeperiod'
|
35
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# Autogenerated by Chef.
|
2
|
+
|
3
|
+
<% unless node['nagios']['ldap_verify_cert'].nil? %>LDAPVerifyServerCert <%= node['nagios']['ldap_verify_cert'] %><% end %>
|
4
|
+
<% unless node['nagios']['ldap_trusted_mode'].nil? -%>LDAPTrustedMode <%= node['nagios']['ldap_trusted_mode'] %> <% end -%>
|
5
|
+
<% unless node['nagios']['ldap_trusted_global_cert'].nil? -%>LDAPTrustedGlobalCert <%= node['nagios']['ldap_trusted_global_cert'] %> <% end -%>
|
6
|
+
|
7
|
+
<VirtualHost *:<%= node['nagios']['http_port'] %>>
|
8
|
+
ServerAdmin <%= node['nagios']['sysadmin_email'] %>
|
9
|
+
<% if @nagios_url %>
|
10
|
+
ServerName <%= @nagios_url %>
|
11
|
+
<% else %>
|
12
|
+
ServerName <%= node['fqdn'] %>
|
13
|
+
<% if node['nagios']['server']['server_alias'] %>
|
14
|
+
ServerAlias <%= node['nagios']['server']['server_alias'] %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
DocumentRoot <%= node['nagios']['docroot'] %>
|
18
|
+
CustomLog <%= @apache_log_dir %>/nagios_access.log combined
|
19
|
+
ErrorLog <%= @apache_log_dir %>/nagios_error.log
|
20
|
+
|
21
|
+
<% if node['platform_family'] == 'debian' && node['nagios']['server']['install_method'] == 'package'-%>
|
22
|
+
Alias /stylesheets /etc/<%= node['nagios']['server']['vname'] %>/stylesheets
|
23
|
+
Alias /<%= node['nagios']['server']['vname'] %>/stylesheets /etc/<%= node['nagios']['server']['vname'] %>/stylesheets
|
24
|
+
<% end -%>
|
25
|
+
ScriptAlias <%= node['nagios']['cgi-path'] %> <%= node['nagios']['cgi-bin'] %>
|
26
|
+
ScriptAlias /cgi-bin/statusjson.cgi <%= node['nagios']['cgi-bin'] %>/statusjson.cgi
|
27
|
+
Alias /<%= node['nagios']['server']['vname'] %> <%= node['nagios']['docroot'] %>
|
28
|
+
|
29
|
+
<Directory "<%= node['nagios']['cgi-bin'] %>">
|
30
|
+
Options ExecCGI FollowSymLinks
|
31
|
+
<% if node['nagios']['default_user_name'] -%>
|
32
|
+
require all granted
|
33
|
+
<% end -%>
|
34
|
+
</Directory>
|
35
|
+
|
36
|
+
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
|
37
|
+
SetHandler "<%= @apache_php_handler %>"
|
38
|
+
</FilesMatch>
|
39
|
+
|
40
|
+
<% if @https -%>
|
41
|
+
SSLEngine On
|
42
|
+
SSLProtocol <%= node['nagios']['ssl_protocols'] %>
|
43
|
+
<% if node['nagios']['ssl_ciphers'] != nil -%>
|
44
|
+
SSLCipherSuite <%= node['nagios']['ssl_ciphers'] %>
|
45
|
+
<% end -%>
|
46
|
+
SSLCertificateFile <%= @ssl_cert_file %>
|
47
|
+
<% if node['nagios']['ssl_cert_chain_file'] %>
|
48
|
+
SSLCertificateChainFile <%= node['nagios']['ssl_cert_chain_file'] %>
|
49
|
+
<% end -%>
|
50
|
+
SSLCertificateKeyFile <%= @ssl_cert_key %>
|
51
|
+
|
52
|
+
<% end -%>
|
53
|
+
<% case node['nagios']['server_auth_method'] -%>
|
54
|
+
<% when "openid" -%>
|
55
|
+
<Location />
|
56
|
+
AuthName "Nagios Server"
|
57
|
+
AuthType OpenID
|
58
|
+
require user <%= node['apache']['allowed_openids'].join(' ') %>
|
59
|
+
AuthOpenIDDBLocation <%= node['apache']['mod_auth_openid']['dblocation'] %>
|
60
|
+
</Location>
|
61
|
+
<% when "cas" -%>
|
62
|
+
CASLoginURL <%= node['nagios']['cas_login_url'] %>
|
63
|
+
CASValidateURL <%= node['nagios']['cas_validate_url'] %>
|
64
|
+
CASValidateServer <%= node['nagios']['cas_validate_server'] %>
|
65
|
+
<% if node['nagios']['cas_root_proxy_url'] -%>
|
66
|
+
CASRootProxiedAs <%= node['nagios']['cas_root_proxy_url'] %>
|
67
|
+
<% end -%>
|
68
|
+
|
69
|
+
<Location />
|
70
|
+
AuthType CAS
|
71
|
+
require <%= node['nagios']['server_auth_require'] %>
|
72
|
+
</Location>
|
73
|
+
<% when "ldap" -%>
|
74
|
+
<Location />
|
75
|
+
AuthName "Nagios Server"
|
76
|
+
AuthType Basic
|
77
|
+
AuthBasicProvider ldap
|
78
|
+
<% unless node['nagios']['ldap_group_attribute_is_dn'].nil? %>AuthLDAPGroupAttributeIsDN <%= node['nagios']['ldap_group_attribute_is_dn'] %><% end %>
|
79
|
+
<% unless node['nagios']['ldap_group_attribute'].nil? -%>AuthLDAPGroupAttribute "<%= node['nagios']['ldap_group_attribute'] %>" <% end -%>
|
80
|
+
<% unless node['nagios']['ldap_bind_dn'].nil? -%>AuthLDAPBindDN "<%= node['nagios']['ldap_bind_dn'] %>" <% end -%>
|
81
|
+
<% unless node['nagios']['ldap_bind_password'].nil? -%>AuthLDAPBindPassword "<%= node['nagios']['ldap_bind_password'] %>"<% end -%>
|
82
|
+
AuthLDAPURL "<%= node['nagios']['ldap_url'] %>"
|
83
|
+
require <%= node['nagios']['server_auth_require'] %>
|
84
|
+
</Location>
|
85
|
+
<% else -%>
|
86
|
+
<Location />
|
87
|
+
AuthName "Nagios Server"
|
88
|
+
AuthType Basic
|
89
|
+
AuthUserFile "<%= node['nagios']['conf_dir'] %>/htpasswd.users"
|
90
|
+
require <%= node['nagios']['server_auth_require'] %>
|
91
|
+
<% unless node['nagios']['allowed_ips'].empty? -%>
|
92
|
+
Order Deny,Allow
|
93
|
+
Deny from All
|
94
|
+
Allow from <%=node['nagios']['allowed_ips'].join(' ') %>
|
95
|
+
Satisfy Any
|
96
|
+
<% end -%>
|
97
|
+
</Location>
|
98
|
+
<% end -%>
|
99
|
+
|
100
|
+
SetEnv TZ "<%= node['nagios']['conf']['use_timezone'] %>"
|
101
|
+
|
102
|
+
</VirtualHost>
|