cloud-mu 3.6.9 → 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.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/Berksfile +2 -3
  3. data/Berksfile.lock +11 -14
  4. data/bin/mu-aws-setup +16 -4
  5. data/bin/mu-configure +2 -1
  6. data/cloud-mu.gemspec +2 -2
  7. data/cookbooks/mu-firewall/Berksfile +1 -1
  8. data/cookbooks/mu-firewall/attributes/default.rb +2 -2
  9. data/cookbooks/mu-firewall/metadata.rb +3 -3
  10. data/cookbooks/mu-firewall/recipes/default.rb +11 -2
  11. data/cookbooks/mu-master/Berksfile +1 -1
  12. data/cookbooks/mu-master/attributes/default.rb +14 -1
  13. data/cookbooks/mu-master/files/default/389ds-perl/ASDialogs.pm +173 -0
  14. data/cookbooks/mu-master/files/default/389ds-perl/AdminMigration.pm +569 -0
  15. data/cookbooks/mu-master/files/default/389ds-perl/AdminServer.pm +952 -0
  16. data/cookbooks/mu-master/files/default/389ds-perl/AdminUtil.pm +983 -0
  17. data/cookbooks/mu-master/files/default/389ds-perl/ConfigDSDialogs.pm +449 -0
  18. data/cookbooks/mu-master/files/default/389ds-perl/DSCreate.pm +1551 -0
  19. data/cookbooks/mu-master/files/default/389ds-perl/DSDialogs.pm +233 -0
  20. data/cookbooks/mu-master/files/default/389ds-perl/DSMigration.pm +1175 -0
  21. data/cookbooks/mu-master/files/default/389ds-perl/DSUpdate.pm +534 -0
  22. data/cookbooks/mu-master/files/default/389ds-perl/DSUpdateDialogs.pm +152 -0
  23. data/cookbooks/mu-master/files/default/389ds-perl/DSUtil.pm +1710 -0
  24. data/cookbooks/mu-master/files/default/389ds-perl/Dialog.pm +249 -0
  25. data/cookbooks/mu-master/files/default/389ds-perl/DialogManager.pm +212 -0
  26. data/cookbooks/mu-master/files/default/389ds-perl/FileConn.pm +461 -0
  27. data/cookbooks/mu-master/files/default/389ds-perl/Inf.pm +268 -0
  28. data/cookbooks/mu-master/files/default/389ds-perl/Migration.pm +327 -0
  29. data/cookbooks/mu-master/files/default/389ds-perl/RegDSDialogs.pm +94 -0
  30. data/cookbooks/mu-master/files/default/389ds-perl/Resource.pm +137 -0
  31. data/cookbooks/mu-master/files/default/389ds-perl/Setup.pm +240 -0
  32. data/cookbooks/mu-master/files/default/389ds-perl/SetupDialogs.pm +243 -0
  33. data/cookbooks/mu-master/files/default/389ds-perl/SetupLog.pm +82 -0
  34. data/cookbooks/mu-master/files/default/setCertName.ldif +4 -0
  35. data/cookbooks/mu-master/libraries/mu.rb +2 -2
  36. data/cookbooks/mu-master/metadata.rb +1 -1
  37. data/cookbooks/mu-master/recipes/389ds.rb +71 -32
  38. data/cookbooks/mu-master/recipes/basepackages.rb +5 -0
  39. data/cookbooks/mu-master/recipes/default.rb +16 -5
  40. data/cookbooks/mu-master/recipes/init.rb +59 -4
  41. data/cookbooks/mu-master/recipes/ssl-certs.rb +6 -0
  42. data/cookbooks/mu-master/recipes/sssd.rb +85 -62
  43. data/cookbooks/mu-master/recipes/update_nagios_only.rb +7 -1
  44. data/cookbooks/mu-master/templates/default/389-directory-setup.inf.erb +11 -26
  45. data/cookbooks/mu-master/templates/default/sssd.conf.erb +18 -8
  46. data/cookbooks/mu-tools/files/default/Mu_CA.pem +33 -0
  47. data/cookbooks/mu-tools/metadata.rb +0 -1
  48. data/cookbooks/mu-tools/recipes/set_local_fw.rb +7 -1
  49. data/cookbooks/mu-tools/templates/amazon/sshd_config.erb +5 -1
  50. data/cookbooks/nagios/CHANGELOG.md +679 -0
  51. data/cookbooks/nagios/LICENSE +201 -0
  52. data/cookbooks/nagios/README.md +340 -0
  53. data/cookbooks/nagios/attributes/config.rb +163 -0
  54. data/cookbooks/nagios/attributes/default.rb +204 -0
  55. data/cookbooks/nagios/libraries/base.rb +311 -0
  56. data/cookbooks/nagios/libraries/command.rb +68 -0
  57. data/cookbooks/nagios/libraries/contact.rb +229 -0
  58. data/cookbooks/nagios/libraries/contactgroup.rb +111 -0
  59. data/cookbooks/{firewall/recipes/disable_firewall.rb → nagios/libraries/custom_option.rb} +20 -7
  60. data/cookbooks/nagios/libraries/data_bag_helper.rb +23 -0
  61. data/cookbooks/nagios/libraries/default.rb +90 -0
  62. data/cookbooks/nagios/libraries/helpers.rb +229 -0
  63. data/cookbooks/nagios/libraries/host.rb +410 -0
  64. data/cookbooks/nagios/libraries/hostdependency.rb +178 -0
  65. data/cookbooks/nagios/libraries/hostescalation.rb +170 -0
  66. data/cookbooks/nagios/libraries/hostgroup.rb +117 -0
  67. data/cookbooks/nagios/libraries/nagios.rb +277 -0
  68. data/cookbooks/nagios/libraries/resource.rb +59 -0
  69. data/cookbooks/nagios/libraries/service.rb +449 -0
  70. data/cookbooks/nagios/libraries/servicedependency.rb +213 -0
  71. data/cookbooks/nagios/libraries/serviceescalation.rb +193 -0
  72. data/cookbooks/nagios/libraries/servicegroup.rb +142 -0
  73. data/cookbooks/nagios/libraries/timeperiod.rb +159 -0
  74. data/cookbooks/nagios/libraries/users_helper.rb +54 -0
  75. data/cookbooks/nagios/metadata.json +44 -0
  76. data/cookbooks/nagios/metadata.rb +22 -0
  77. data/cookbooks/nagios/recipes/_load_databag_config.rb +153 -0
  78. data/cookbooks/nagios/recipes/_load_default_config.rb +241 -0
  79. data/cookbooks/nagios/recipes/apache.rb +114 -0
  80. data/cookbooks/nagios/recipes/default.rb +41 -0
  81. data/cookbooks/nagios/recipes/nginx.rb +114 -0
  82. data/cookbooks/nagios/recipes/pagerduty.rb +95 -0
  83. data/cookbooks/nagios/recipes/server.rb +182 -0
  84. data/cookbooks/nagios/recipes/server_package.rb +85 -0
  85. data/cookbooks/nagios/recipes/server_source.rb +137 -0
  86. data/cookbooks/nagios/resources/command.rb +34 -0
  87. data/cookbooks/nagios/resources/conf.rb +52 -0
  88. data/cookbooks/nagios/resources/contact.rb +34 -0
  89. data/cookbooks/nagios/resources/contactgroup.rb +35 -0
  90. data/cookbooks/nagios/resources/host.rb +35 -0
  91. data/cookbooks/nagios/resources/hostdependency.rb +35 -0
  92. data/cookbooks/nagios/resources/hostescalation.rb +36 -0
  93. data/cookbooks/nagios/resources/hostgroup.rb +35 -0
  94. data/cookbooks/nagios/resources/resource.rb +34 -0
  95. data/cookbooks/nagios/resources/service.rb +35 -0
  96. data/cookbooks/nagios/resources/servicedependency.rb +35 -0
  97. data/cookbooks/nagios/resources/serviceescalation.rb +35 -0
  98. data/cookbooks/nagios/resources/servicegroup.rb +35 -0
  99. data/cookbooks/nagios/resources/timeperiod.rb +35 -0
  100. data/cookbooks/nagios/templates/apache2.conf.erb +102 -0
  101. data/cookbooks/nagios/templates/cgi.cfg.erb +266 -0
  102. data/cookbooks/nagios/templates/commands.cfg.erb +13 -0
  103. data/cookbooks/nagios/templates/contacts.cfg.erb +37 -0
  104. data/cookbooks/nagios/templates/hostgroups.cfg.erb +25 -0
  105. data/cookbooks/nagios/templates/hosts.cfg.erb +15 -0
  106. data/cookbooks/nagios/templates/htpasswd.users.erb +6 -0
  107. data/cookbooks/nagios/templates/nagios.cfg.erb +22 -0
  108. data/cookbooks/nagios/templates/nginx.conf.erb +80 -0
  109. data/cookbooks/nagios/templates/pagerduty.cgi.erb +185 -0
  110. data/cookbooks/nagios/templates/resource.cfg.erb +27 -0
  111. data/cookbooks/nagios/templates/servicedependencies.cfg.erb +15 -0
  112. data/cookbooks/nagios/templates/servicegroups.cfg.erb +14 -0
  113. data/cookbooks/nagios/templates/services.cfg.erb +14 -0
  114. data/cookbooks/nagios/templates/spawn-fcgi.erb +10 -0
  115. data/cookbooks/nagios/templates/templates.cfg.erb +31 -0
  116. data/cookbooks/nagios/templates/timeperiods.cfg.erb +13 -0
  117. data/extras/platform_berksfile_base +3 -3
  118. data/extras/python_rpm/build.sh +4 -4
  119. data/extras/python_rpm/muthon.spec +2 -4
  120. data/extras/vault_tools/export_vaults.sh +11 -1
  121. data/install/installer +1 -1
  122. data/modules/mu/kittens.rb +27523 -0
  123. data/modules/mu/master/ldap.rb +48 -31
  124. data/modules/mu/master.rb +69 -0
  125. data/modules/mu/mu.yaml.rb +351 -0
  126. data/modules/mu/providers/aws/firewall_rule.rb +3 -1
  127. data/modules/mu/providers/aws.rb +27 -19
  128. data/modules/mu/providers/google.rb +1 -1
  129. data/modules/mu.rb +5 -4
  130. metadata +99 -48
  131. data/cookbooks/firewall/CHANGELOG.md +0 -488
  132. data/cookbooks/firewall/LICENSE +0 -202
  133. data/cookbooks/firewall/README.md +0 -366
  134. data/cookbooks/firewall/TODO.md +0 -6
  135. data/cookbooks/firewall/attributes/default.rb +0 -5
  136. data/cookbooks/firewall/attributes/firewalld.rb +0 -8
  137. data/cookbooks/firewall/attributes/iptables.rb +0 -17
  138. data/cookbooks/firewall/attributes/ufw.rb +0 -12
  139. data/cookbooks/firewall/attributes/windows.rb +0 -8
  140. data/cookbooks/firewall/libraries/helpers.rb +0 -105
  141. data/cookbooks/firewall/libraries/helpers_firewalld.rb +0 -116
  142. data/cookbooks/firewall/libraries/helpers_firewalld_dbus.rb +0 -72
  143. data/cookbooks/firewall/libraries/helpers_iptables.rb +0 -112
  144. data/cookbooks/firewall/libraries/helpers_nftables.rb +0 -170
  145. data/cookbooks/firewall/libraries/helpers_ufw.rb +0 -142
  146. data/cookbooks/firewall/libraries/helpers_windows.rb +0 -129
  147. data/cookbooks/firewall/libraries/provider_firewall_firewalld.rb +0 -179
  148. data/cookbooks/firewall/libraries/provider_firewall_iptables.rb +0 -171
  149. data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu.rb +0 -200
  150. data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu1404.rb +0 -200
  151. data/cookbooks/firewall/libraries/provider_firewall_rule.rb +0 -34
  152. data/cookbooks/firewall/libraries/provider_firewall_ufw.rb +0 -138
  153. data/cookbooks/firewall/libraries/provider_firewall_windows.rb +0 -126
  154. data/cookbooks/firewall/libraries/resource_firewall.rb +0 -26
  155. data/cookbooks/firewall/libraries/resource_firewall_rule.rb +0 -52
  156. data/cookbooks/firewall/metadata.json +0 -40
  157. data/cookbooks/firewall/metadata.rb +0 -15
  158. data/cookbooks/firewall/recipes/default.rb +0 -76
  159. data/cookbooks/firewall/recipes/firewalld.rb +0 -87
  160. data/cookbooks/firewall/resources/firewalld.rb +0 -28
  161. data/cookbooks/firewall/resources/firewalld_config.rb +0 -39
  162. data/cookbooks/firewall/resources/firewalld_helpers.rb +0 -106
  163. data/cookbooks/firewall/resources/firewalld_icmptype.rb +0 -88
  164. data/cookbooks/firewall/resources/firewalld_ipset.rb +0 -104
  165. data/cookbooks/firewall/resources/firewalld_policy.rb +0 -115
  166. data/cookbooks/firewall/resources/firewalld_service.rb +0 -98
  167. data/cookbooks/firewall/resources/firewalld_zone.rb +0 -118
  168. data/cookbooks/firewall/resources/nftables.rb +0 -71
  169. data/cookbooks/firewall/resources/nftables_rule.rb +0 -113
  170. data/cookbooks/firewall/templates/default/ufw/default.erb +0 -13
  171. /data/cookbooks/{firewall → nagios}/chefignore +0 -0
  172. /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>