Skip to content

Commit

Permalink
Initial import.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnichol committed Oct 22, 2010
0 parents commit 470ef07
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
= DESCRIPTION:

Installs an HTTP PAM authentication nginx module.

= REQUIREMENTS:

= ATTRIBUTES:

= USAGE:

= LICENSE and AUTHOR:

Author:: Fletcher Nichol (<fnichol@nichol.ca>)

Copyright:: 2010, Fletcher Nichol

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.
17 changes: 17 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
maintainer "Fletcher Nichol"
maintainer_email "fnichol@nichol.ca"
license "Apache 2.0"
description "Installs ngx_http_auth_pam"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.1"

recipe "nginx_http_auth_pam", "Installs ngx_http_auth_pam nginx module"

%w{ nginx }.each do |cb|
depends cb
end

%w{ ubuntu }.each do |os|
supports os
end

39 changes: 39 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Cookbook Name:: nginx_http_auth_pam
# Based on rvm_passenger
# Recipe:: default
#
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
#
# Copyright:: 2010, Fletcher Nichol
#
# 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 "nginx::source"

version = node[:nginx_http_auth_path][:version]
src_dir = "/tmp/ngx_http_auth_pam_module-#{version}"

remote_file "/tmp/ngx_http_auth_pam_module-#{version}.tar.gz" do
source "http://web.iti.upv.es/~sto/nginx/ngx_http_auth_pam_module-#{version}.tar.gz"
action :create_if_missing
end

bash "compile_nginx_source" do
cwd "/tmp"
code <<-EOH
tar zxf ngx_http_auth_pam_module-#{version}
EOH
creates src_dir
end

0 comments on commit 470ef07

Please sign in to comment.