Initial Chef repository

This commit is contained in:
Greg Karékinian
2015-07-21 19:45:23 +02:00
parent 7e5401fc71
commit ee4079fa85
1151 changed files with 185163 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: default
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Always add this, so that we don't require this to be added if we want to add other components
default = Opscode::IIS::Helper.older_than_windows2008r2? ? 'Web-Server' : 'IIS-WebServerRole'
(node['iis']['components'] + [default]).each do |feature|
windows_feature feature do
action :install
all !Opscode::IIS::Helper.older_than_windows2012?
end
end
service 'iis' do
service_name 'W3SVC'
action [:enable, :start]
end

View File

@@ -0,0 +1,29 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_application_initialization
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
log 'Application Initialization module is not supported on Windows 2008 or lower, ignoring'
else
windows_feature 'IIS-ApplicationInit' do
action :install
end
end

View File

@@ -0,0 +1,34 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_aspnet
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
include_recipe 'iis::mod_isapi'
if Opscode::IIS::Helper.older_than_windows2008r2?
features = %w(NET-Framework)
else
features = %w(IIS-NetFxExtensibility IIS-ASPNET)
end
features.each do |feature|
windows_feature feature do
action :install
end
end

View File

@@ -0,0 +1,34 @@
#
# Author:: Blair Hamilton (<blairham@me.com>)
# Cookbook Name:: iis
# Recipe:: mod_aspnet45
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
include_recipe 'iis::mod_isapi'
if Opscode::IIS::Helper.older_than_windows2008r2?
features = %w(NET-Framework)
else
features = %w(NetFx4Extended-ASPNET45 IIS-NetFxExtensibility45 IIS-ASPNET45)
end
features.each do |feature|
windows_feature feature do
action :install
end
end

View File

@@ -0,0 +1,26 @@
#
# Author:: Justin Schuhmann
# Cookbook Name:: iis
# Recipe:: mod_auth_basic
#
# Copyright:: Justin Schuhmann
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
iis_section 'unlocks anonymous authentication control in web.config' do
section 'system.webServer/security/authentication/anonymousAuthentication'
action :unlock
end

View File

@@ -0,0 +1,36 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_auth_basic
#
# Copyright:: Copyright (c) 2011 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-Basic-Auth'
else
feature = 'IIS-BasicAuthentication'
end
windows_feature feature do
action :install
end
iis_section 'unlocks basic authentication control in web.config' do
section 'system.webServer/security/authentication/basicAuthentication'
action :unlock
end

View File

@@ -0,0 +1,36 @@
#
# Author:: Justin Schuhmann
# Cookbook Name:: iis
# Recipe:: mod_auth_basic
#
# Copyright:: Justin Schuhmann
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-Digest-Auth'
else
feature = 'IIS-DigestAuthentication'
end
windows_feature feature do
action :install
end
iis_section 'unlocks digest authentication control in web.config' do
section 'system.webServer/security/authentication/digestAuthentication'
action :unlock
end

View File

@@ -0,0 +1,36 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_auth_windows
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-Windows-Auth'
else
feature = 'IIS-WindowsAuthentication'
end
windows_feature feature do
action :install
end
iis_section 'unlocks windows authentication control in web.config' do
section 'system.webServer/security/authentication/windowsAuthentication'
action :unlock
end

View File

@@ -0,0 +1,31 @@
#
# Author:: Richard Downer (<richard.downer@cloudsoftcorp.com>)
# Cookbook Name:: iis
# Recipe:: mod_cgi
#
# Copyright 2013, Cloudsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-CGI'
else
feature = 'IIS-CGI'
end
windows_feature feature do
action :install
end

View File

@@ -0,0 +1,31 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_compress_dynamic
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-Dyn-Compression'
else
feature = 'IIS-HttpCompressionDynamic'
end
windows_feature feature do
action :install
end

View File

@@ -0,0 +1,31 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_compress_static
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-Stat-Compression'
else
feature = 'IIS-HttpCompressionStatic'
end
windows_feature feature do
action :install
end

View File

@@ -0,0 +1,33 @@
#
# Author:: Kevin Rivers (<kevin@kevinrivers.com>)
# Cookbook Name:: iis
# Recipe:: mod_ftp
#
# Copyright 2014, Kevin Rivers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
features = %w(Web-Ftp-Server Web-Ftp-Service Web-Ftp-Ext)
else
features = %w(IIS-FTPServer IIS-FTPSvc IIS-FTPExtensibility)
end
features.each do |f|
windows_feature f do
action :install
end
end

View File

@@ -0,0 +1,33 @@
#
# Author:: Kristian Vlaardingerbroek (<kvlaardingerbroek@schubergphilis.com>)
# Cookbook Name:: iis
# Recipe:: mod_iis6_metabase_compat
#
# Copyright 2013, Schuberg Philis B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
features = %w(Web-Mgmt-Compat Web-Metabase)
else
features = %w(IIS-IIS6ManagementCompatibility IIS-Metabase)
end
features.each do |f|
windows_feature f do
action :install
end
end

View File

@@ -0,0 +1,33 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_isapi
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
features = %w(Web-ISAPI-Filter Web-ISAPI-Ext)
else
features = %w(IIS-ISAPIFilter IIS-ISAPIExtensions)
end
features.each do |feature|
windows_feature feature do
action :install
end
end

View File

@@ -0,0 +1,31 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_logging
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-Http-Logging'
else
feature = 'IIS-CustomLogging'
end
windows_feature feature do
action :install
end

View File

@@ -0,0 +1,33 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_management
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
features = %w(Web-Mgmt-Console Web-Mgmt-Service)
else
features = %w(IIS-ManagementConsole IIS-ManagementService)
end
features.each do |feature|
windows_feature feature do
action :install
end
end

View File

@@ -0,0 +1,33 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_security
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
features = %w(Web-Url-Auth Web-Filtering Web-IP-Security)
else
features = %w(IIS-URLAuthorization IIS-RequestFiltering IIS-IPSecurity)
end
features.each do |feature|
windows_feature feature do
action :install
end
end

View File

@@ -0,0 +1,31 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook Name:: iis
# Recipe:: mod_diagnostics
#
# Copyright 2011, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'iis'
if Opscode::IIS::Helper.older_than_windows2008r2?
feature = 'Web-Http-Tracing'
else
feature = 'IIS-HTTPTracing'
end
windows_feature feature do
action :install
end

View File

@@ -0,0 +1,27 @@
#
# Author:: Kendrick Martin (<kendrick.martin@webtrends.com>)
# Cookbook Name:: iis
# Recipe:: remove_default_site
#
# Copyright 2012, Webtrends, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
iis_site 'Default Web Site' do
action [:stop, :delete]
end
iis_pool 'DefaultAppPool' do
action [:stop, :delete]
end