vagrant-managed-servers 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Berksfile +4 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +14 -0
- data/LICENSE +8 -0
- data/README.md +142 -0
- data/Rakefile +21 -0
- data/Vagrantfile +44 -0
- data/cookbooks/apache2/CHANGELOG.md +95 -0
- data/cookbooks/apache2/CONTRIBUTING.md +257 -0
- data/cookbooks/apache2/Gemfile +10 -0
- data/cookbooks/apache2/LICENSE +201 -0
- data/cookbooks/apache2/README.md +567 -0
- data/cookbooks/apache2/attributes/default.rb +149 -0
- data/cookbooks/apache2/attributes/mod_auth_cas.rb +2 -0
- data/cookbooks/apache2/attributes/mod_auth_openid.rb +32 -0
- data/cookbooks/apache2/definitions/apache_conf.rb +26 -0
- data/cookbooks/apache2/definitions/apache_module.rb +53 -0
- data/cookbooks/apache2/definitions/apache_site.rb +43 -0
- data/cookbooks/apache2/definitions/web_app.rb +49 -0
- data/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
- data/cookbooks/apache2/files/default/tests/minitest/default_test.rb +77 -0
- data/cookbooks/apache2/files/default/tests/minitest/god_monitor_test.rb +34 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_apreq2_test.rb +19 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_auth_cas_test.rb +11 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +37 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_cgi_test.rb +13 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +14 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_fastcgi.rb +11 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +18 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +13 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +10 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +23 -0
- data/cookbooks/apache2/files/default/tests/minitest/support/helpers.rb +50 -0
- data/cookbooks/apache2/metadata.json +513 -0
- data/cookbooks/apache2/metadata.rb +207 -0
- data/cookbooks/apache2/recipes/default.rb +208 -0
- data/cookbooks/apache2/recipes/god_monitor.rb +33 -0
- data/cookbooks/apache2/recipes/logrotate.rb +29 -0
- data/cookbooks/apache2/recipes/mod_alias.rb +22 -0
- data/cookbooks/apache2/recipes/mod_apreq2.rb +54 -0
- data/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
- data/cookbooks/apache2/recipes/mod_auth_cas.rb +59 -0
- data/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
- data/cookbooks/apache2/recipes/mod_auth_openid.rb +111 -0
- data/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
- data/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
- data/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
- data/cookbooks/apache2/recipes/mod_dav.rb +20 -0
- data/cookbooks/apache2/recipes/mod_dav_fs.rb +21 -0
- data/cookbooks/apache2/recipes/mod_dav_svn.rb +41 -0
- data/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
- data/cookbooks/apache2/recipes/mod_dir.rb +22 -0
- data/cookbooks/apache2/recipes/mod_env.rb +20 -0
- data/cookbooks/apache2/recipes/mod_expires.rb +20 -0
- data/cookbooks/apache2/recipes/mod_fastcgi.rb +26 -0
- data/cookbooks/apache2/recipes/mod_fcgid.rb +55 -0
- data/cookbooks/apache2/recipes/mod_headers.rb +20 -0
- data/cookbooks/apache2/recipes/mod_include.rb +20 -0
- data/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
- data/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
- data/cookbooks/apache2/recipes/mod_logio.rb +24 -0
- data/cookbooks/apache2/recipes/mod_mime.rb +22 -0
- data/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
- data/cookbooks/apache2/recipes/mod_perl.rb +44 -0
- data/cookbooks/apache2/recipes/mod_php5.rb +77 -0
- data/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
- data/cookbooks/apache2/recipes/mod_proxy_ajp.rb +21 -0
- data/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
- data/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
- data/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
- data/cookbooks/apache2/recipes/mod_python.rb +38 -0
- data/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
- data/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
- data/cookbooks/apache2/recipes/mod_ssl.rb +46 -0
- data/cookbooks/apache2/recipes/mod_status.rb +22 -0
- data/cookbooks/apache2/recipes/mod_wsgi.rb +38 -0
- data/cookbooks/apache2/recipes/mod_xsendfile.rb +38 -0
- data/cookbooks/apache2/templates/default/a2dismod.erb +22 -0
- data/cookbooks/apache2/templates/default/a2dissite.erb +29 -0
- data/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
- data/cookbooks/apache2/templates/default/a2ensite.erb +38 -0
- data/cookbooks/apache2/templates/default/apache2.conf.erb +237 -0
- data/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
- data/cookbooks/apache2/templates/default/charset.erb +6 -0
- data/cookbooks/apache2/templates/default/default-site.erb +57 -0
- data/cookbooks/apache2/templates/default/mods/README +2 -0
- data/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
- data/cookbooks/apache2/templates/default/mods/auth_cas.conf.erb +1 -0
- data/cookbooks/apache2/templates/default/mods/auth_cas.load.erb +1 -0
- data/cookbooks/apache2/templates/default/mods/authopenid.load.erb +1 -0
- data/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
- data/cookbooks/apache2/templates/default/mods/deflate.conf.erb +16 -0
- data/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
- data/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +5 -0
- data/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
- data/cookbooks/apache2/templates/default/mods/mime.conf.erb +198 -0
- data/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
- data/cookbooks/apache2/templates/default/mods/php5.conf.erb +16 -0
- data/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
- data/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
- data/cookbooks/apache2/templates/default/mods/ssl.conf.erb +76 -0
- data/cookbooks/apache2/templates/default/mods/status.conf.erb +26 -0
- data/cookbooks/apache2/templates/default/port_apache.erb +2 -0
- data/cookbooks/apache2/templates/default/ports.conf.erb +6 -0
- data/cookbooks/apache2/templates/default/security.erb +50 -0
- data/cookbooks/apache2/templates/default/web_app.conf.erb +43 -0
- data/cookbooks/apt/Berksfile +8 -0
- data/cookbooks/apt/CHANGELOG.md +97 -0
- data/cookbooks/apt/CONTRIBUTING +29 -0
- data/cookbooks/apt/LICENSE +201 -0
- data/cookbooks/apt/README.md +243 -0
- data/cookbooks/apt/TESTING.md +25 -0
- data/cookbooks/apt/attributes/default.rb +4 -0
- data/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/cookbooks/apt/metadata.json +1 -0
- data/cookbooks/apt/metadata.rb +30 -0
- data/cookbooks/apt/providers/preference.rb +61 -0
- data/cookbooks/apt/providers/repository.rb +132 -0
- data/cookbooks/apt/recipes/cacher-client.rb +59 -0
- data/cookbooks/apt/recipes/cacher-ng.rb +40 -0
- data/cookbooks/apt/recipes/default.rb +68 -0
- data/cookbooks/apt/resources/preference.rb +30 -0
- data/cookbooks/apt/resources/repository.rb +40 -0
- data/cookbooks/apt/templates/debian-6.0/acng.conf.erb +174 -0
- data/cookbooks/apt/templates/default/01proxy.erb +2 -0
- data/cookbooks/apt/templates/default/acng.conf.erb +276 -0
- data/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +270 -0
- data/dummy.box +0 -0
- data/lib/vagrant-managed-servers.rb +18 -0
- data/lib/vagrant-managed-servers/action.rb +114 -0
- data/lib/vagrant-managed-servers/action/is_created.rb +18 -0
- data/lib/vagrant-managed-servers/action/is_reachable.rb +18 -0
- data/lib/vagrant-managed-servers/action/link_server.rb +31 -0
- data/lib/vagrant-managed-servers/action/message_not_reachable.rb +16 -0
- data/lib/vagrant-managed-servers/action/read_state.rb +84 -0
- data/lib/vagrant-managed-servers/action/sync_folders.rb +85 -0
- data/lib/vagrant-managed-servers/action/unlink_server.rb +30 -0
- data/lib/vagrant-managed-servers/action/warn_networks.rb +19 -0
- data/lib/vagrant-managed-servers/config.rb +28 -0
- data/lib/vagrant-managed-servers/errors.rb +19 -0
- data/lib/vagrant-managed-servers/plugin.rb +72 -0
- data/lib/vagrant-managed-servers/provider.rb +51 -0
- data/lib/vagrant-managed-servers/util/timer.rb +17 -0
- data/lib/vagrant-managed-servers/version.rb +5 -0
- data/locales/en.yml +45 -0
- data/spec/vagrant-managed-servers/config_spec.rb +28 -0
- data/vagrant-managed-servers.gemspec +56 -0
- metadata +264 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: logrotate
|
4
|
+
#
|
5
|
+
# Copyright 2012, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_service = service "apache2" do
|
21
|
+
action :nothing
|
22
|
+
end
|
23
|
+
|
24
|
+
begin
|
25
|
+
include_recipe 'logrotate'
|
26
|
+
rescue
|
27
|
+
Chef::Log.warn("The apache::logrotate recipe requires the logrotate cookbook. Install the cookbook with `knife cookbook site install logrotate`.")
|
28
|
+
end
|
29
|
+
logrotate_app apache_service.service_name
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: alias
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "alias" do
|
21
|
+
conf true
|
22
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: apreq2
|
4
|
+
#
|
5
|
+
# modified from the python recipe by Jeremy Bingham
|
6
|
+
#
|
7
|
+
# Copyright 2008-2009, Opscode, Inc.
|
8
|
+
#
|
9
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
+
# you may not use this file except in compliance with the License.
|
11
|
+
# You may obtain a copy of the License at
|
12
|
+
#
|
13
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
+
#
|
15
|
+
# Unless required by applicable law or agreed to in writing, software
|
16
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
+
# See the License for the specific language governing permissions and
|
19
|
+
# limitations under the License.
|
20
|
+
#
|
21
|
+
|
22
|
+
include_recipe "apache2"
|
23
|
+
|
24
|
+
case node['platform_family']
|
25
|
+
when "debian"
|
26
|
+
|
27
|
+
package "libapache2-mod-apreq2"
|
28
|
+
|
29
|
+
when "rhel", "fedora"
|
30
|
+
|
31
|
+
package "libapreq2" do
|
32
|
+
notifies :run, "execute[generate-module-list]", :immediately
|
33
|
+
end
|
34
|
+
|
35
|
+
# seems that the apreq lib is weirdly broken or something - it needs to be
|
36
|
+
# loaded as "apreq", but on RHEL & derivitatives the file needs a symbolic
|
37
|
+
# link to mod_apreq.so.
|
38
|
+
link "/usr/lib64/httpd/modules/mod_apreq.so" do
|
39
|
+
to "/usr/lib64/httpd/modules/mod_apreq2.so"
|
40
|
+
only_if "test -f /usr/lib64/httpd/modules/mod_apreq2.so"
|
41
|
+
end
|
42
|
+
|
43
|
+
link "/usr/lib/httpd/modules/mod_apreq.so" do
|
44
|
+
to "/usr/lib/httpd/modules/mod_apreq2.so"
|
45
|
+
only_if "test -f /usr/lib/httpd/modules/mod_apreq2.so"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
file "#{node['apache']['dir']}/conf.d/apreq.conf" do
|
50
|
+
action :delete
|
51
|
+
backup false
|
52
|
+
end
|
53
|
+
|
54
|
+
apache_module "apreq"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: auth_basic
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "auth_basic"
|
@@ -0,0 +1,59 @@
|
|
1
|
+
include_recipe "apache2"
|
2
|
+
|
3
|
+
if node['apache']['mod_auth_cas']['from_source']
|
4
|
+
|
5
|
+
package "httpd-devel" do
|
6
|
+
package_name value_for_platform_family(
|
7
|
+
["rhel", "fedora", "suse"] => "httpd-devel",
|
8
|
+
"debian" => "apache2-dev"
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
git '/tmp/mod_auth_cas' do
|
13
|
+
repository 'git://github.com/Jasig/mod_auth_cas.git'
|
14
|
+
revision node['apache']['mod_auth_cas']['source_revision']
|
15
|
+
notifies :run, 'execute[compile mod_auth_cas]', :immediately
|
16
|
+
end
|
17
|
+
|
18
|
+
execute 'compile mod_auth_cas' do
|
19
|
+
command './configure && make && make install'
|
20
|
+
cwd '/tmp/mod_auth_cas'
|
21
|
+
not_if "test -f #{node['apache']['libexecdir']}/mod_auth_cas.so"
|
22
|
+
end
|
23
|
+
|
24
|
+
template "#{node['apache']['dir']}/mods-available/auth_cas.load" do
|
25
|
+
source 'mods/auth_cas.load.erb'
|
26
|
+
owner 'root'
|
27
|
+
group node['apache']['root_group']
|
28
|
+
mode 00644
|
29
|
+
end
|
30
|
+
|
31
|
+
else
|
32
|
+
case node['platform_family']
|
33
|
+
when "debian"
|
34
|
+
|
35
|
+
package "libapache2-mod-auth-cas"
|
36
|
+
|
37
|
+
when "rhel", "fedora"
|
38
|
+
|
39
|
+
yum_package "mod_auth_cas" do
|
40
|
+
notifies :run, "execute[generate-module-list]", :immediately
|
41
|
+
end
|
42
|
+
|
43
|
+
file "#{node['apache']['dir']}/conf.d/auth_cas.conf" do
|
44
|
+
action :delete
|
45
|
+
backup false
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
apache_module 'auth_cas' do
|
52
|
+
conf true
|
53
|
+
end
|
54
|
+
|
55
|
+
directory "#{node['apache']['cache_dir']}/mod_auth_cas" do
|
56
|
+
owner node['apache']['user']
|
57
|
+
group node['apache']['group']
|
58
|
+
mode 00700
|
59
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: auth_digest
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "auth_digest"
|
@@ -0,0 +1,111 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: mod_auth_openid
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
openid_dev_pkgs = value_for_platform_family(
|
21
|
+
["debian"] => %w{g++ apache2-prefork-dev libopkele-dev libopkele3},
|
22
|
+
["rhel","fedora"] => %w{gcc-c++ httpd-devel curl-devel libtidy libtidy-devel sqlite-devel pcre-devel openssl-devel make},
|
23
|
+
"arch" => ["libopkele"],
|
24
|
+
"freebsd" => %w{libopkele pcre sqlite3}
|
25
|
+
)
|
26
|
+
|
27
|
+
make_cmd = value_for_platform_family(
|
28
|
+
"freebsd" => { "default" => "gmake" },
|
29
|
+
"default" => "make"
|
30
|
+
)
|
31
|
+
|
32
|
+
case node['platform_family']
|
33
|
+
when "arch"
|
34
|
+
|
35
|
+
include_recipe "pacman"
|
36
|
+
package "tidyhtml"
|
37
|
+
pacman_aur openid_dev_pkgs.first do
|
38
|
+
action [:build, :install]
|
39
|
+
end
|
40
|
+
|
41
|
+
else
|
42
|
+
openid_dev_pkgs.each do |pkg|
|
43
|
+
|
44
|
+
package pkg
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
case node['platform_family']
|
50
|
+
when "rhel", "fedora"
|
51
|
+
remote_file "#{Chef::Config['file_cache_path']}/libopkele-2.0.4.tar.gz" do
|
52
|
+
source "http://kin.klever.net/dist/libopkele-2.0.4.tar.gz"
|
53
|
+
mode 00644
|
54
|
+
end
|
55
|
+
|
56
|
+
bash "install libopkele" do
|
57
|
+
cwd Chef::Config['file_cache_path']
|
58
|
+
# Ruby 1.8.6 does not have rpartition, unfortunately
|
59
|
+
syslibdir = node['apache']['lib_dir'][0..node['apache']['lib_dir'].rindex("/")]
|
60
|
+
code <<-EOH
|
61
|
+
tar zxvf libopkele-2.0.4.tar.gz
|
62
|
+
cd libopkele-2.0.4 && ./configure --prefix=/usr --libdir=#{syslibdir}
|
63
|
+
#{make_cmd} && #{make_cmd} install
|
64
|
+
EOH
|
65
|
+
not_if { File.exists?("#{syslibdir}/libopkele.a") }
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
_checksum = node['apache']['mod_auth_openid']['checksum']
|
70
|
+
version = node['apache']['mod_auth_openid']['version']
|
71
|
+
configure_flags = node['apache']['mod_auth_openid']['configure_flags']
|
72
|
+
|
73
|
+
remote_file "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}.tar.gz" do
|
74
|
+
source "http://butterfat.net/releases/mod_auth_openid/mod_auth_openid-#{version}.tar.gz"
|
75
|
+
mode 00644
|
76
|
+
checksum _checksum
|
77
|
+
end
|
78
|
+
|
79
|
+
bash "install mod_auth_openid" do
|
80
|
+
cwd Chef::Config['file_cache_path']
|
81
|
+
code <<-EOH
|
82
|
+
tar zxvf mod_auth_openid-#{version}.tar.gz
|
83
|
+
cd mod_auth_openid-#{version} && ./configure #{configure_flags.join(' ')}
|
84
|
+
perl -pi -e "s/-i -a -n 'authopenid'/-i -n 'authopenid'/g" Makefile
|
85
|
+
#{make_cmd} && #{make_cmd} install
|
86
|
+
EOH
|
87
|
+
not_if { ::File.exists?("#{node['apache']['libexecdir']}/mod_auth_openid.so") }
|
88
|
+
end
|
89
|
+
|
90
|
+
directory node['apache']['mod_auth_openid']['cache_dir'] do
|
91
|
+
owner node['apache']['user']
|
92
|
+
group node['apache']['group']
|
93
|
+
mode 00700
|
94
|
+
end
|
95
|
+
|
96
|
+
file node['apache']['mod_auth_openid']['dblocation'] do
|
97
|
+
owner node['apache']['user']
|
98
|
+
group node['apache']['group']
|
99
|
+
mode 00644
|
100
|
+
end
|
101
|
+
|
102
|
+
template "#{node['apache']['dir']}/mods-available/authopenid.load" do
|
103
|
+
source "mods/authopenid.load.erb"
|
104
|
+
owner "root"
|
105
|
+
group node['apache']['root_group']
|
106
|
+
mode 00644
|
107
|
+
end
|
108
|
+
|
109
|
+
apache_module "authopenid" do
|
110
|
+
filename "mod_auth_openid.so"
|
111
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: authn_file
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "authn_file"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: authnz_ldap
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "authnz_ldap"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: authz_default
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "authz_default"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: authz_groupfile
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "authz_groupfile"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: authz_host
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "authz_host"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: authz_user
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "authz_user"
|