Skip to content

Commit

Permalink
remove wordpress tarball, retrieve from site instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Feb 26, 2010
1 parent 85feb0c commit 106eced
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
Binary file removed wordpress/files/default/wordpress-2.9.2.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion wordpress/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs/Configures wordpress"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.4"
version "0.5"
depends "php"
depends "apache2"
depends "mysql"
Expand Down
22 changes: 9 additions & 13 deletions wordpress/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@

include_recipe "apache2"

if node.has_key?("ec2")
server_fqdn = node.ec2.public_hostname
else
server_fqdn = node.fqdn
end

remote_file "#{Chef::Config[:file_cache_path]}/wordpress-#{node[:wordpress][:version]}.tar.gz" do
checksum node[:wordpress][:checksum]
source "http://wordpress.org/wordpress-#{node[:wordpress][:version]}.tar.gz"
Expand Down Expand Up @@ -77,7 +83,7 @@
action :create
end

log "Navigate to 'http://#{node.fqdn}/wp-admin/install.php' to complete wordpress installation" do
log "Navigate to 'http://#{server_fqdn}/wp-admin/install.php' to complete wordpress installation" do
action :nothing
end

Expand All @@ -95,24 +101,14 @@
:logged_in_key => node[:wordpress][:keys][:logged_in],
:nonce_key => node[:wordpress][:keys][:nonce]
)
notifies :write, resources(:log => "Navigate to 'http://#{node.fqdn}/wp-admin/install.php' to complete installation")
notifies :write, resources(:log => "Navigate to 'http://#{server_fqdn}/wp-admin/install.php' to complete wordpress installation")
end

include_recipe %w{php::php5 php::module_mysql}

web_app "wordpress" do
template "wordpress.conf.erb"
docroot "#{node[:wordpress][:dir]}"
server_name(
case node.has_key? "ec2"
when true:
node.ec2.public_hostname
when false:
node.fqdn
end
)
server_name server_fqdn
server_aliases node.fqdn
end

# step 5
# for now, you must manually go to http://hostname/wordpressdir/wp-admin/install.php to complete installation.

0 comments on commit 106eced

Please sign in to comment.