diff --git a/README.rdoc b/README.rdoc index f614c21..2b8bc5a 100644 --- a/README.rdoc +++ b/README.rdoc @@ -11,7 +11,8 @@ All node attributes are set under the :s3cmd namespace. * :users - array of usernames for whom a .s3cfg will be created in their home directory; defaults to [:root] * :aws_access_key_id - AWS access key for S3 * :aws_secret_access_key - AWS secret access key for S3 +* :bucket_location - AWS bucket location for S3; defaults to "US" = USAGE: -Just add the s3cmd recipe to the applicable nodes \ No newline at end of file +Just add the s3cmd recipe to the applicable nodes diff --git a/attributes/default.rb b/attributes/default.rb index 42bb637..8c44e87 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -1,10 +1,15 @@ # list of users that will have the s3cmd configuration default[:s3cmd][:users] = [:root] +# Bucket Location +default[:s3cmd][:bucket_location] = "US" + # S3 credentials default[:s3cmd][:aws_access_key_id] = "" default[:s3cmd][:aws_secret_access_key] = "" +# s3cmd details +default[:s3cmd][:repository] = "git://github.com/s3tools/s3cmd.git" default[:s3cmd][:version] = "v1.1.0-beta3" default[:s3cmd][:user] = "root" -default[:s3cmd][:install_prefix_root] = "/usr/local" \ No newline at end of file +default[:s3cmd][:install_prefix_root] = "/usr/local" diff --git a/recipes/default.rb b/recipes/default.rb index f78efb8..4ed6c95 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -11,7 +11,7 @@ end git "#{node[:s3cmd][:install_prefix_root]}/share/s3cmd" do - repository "git://github.com/s3tools/s3cmd.git" + repository "#{node[:s3cmd][:repository]}" reference node[:s3cmd][:version] action :sync end diff --git a/templates/default/s3cfg.erb b/templates/default/s3cfg.erb index d46a218..4e7cb3a 100644 --- a/templates/default/s3cfg.erb +++ b/templates/default/s3cfg.erb @@ -1,7 +1,7 @@ [default] access_key = <%= node[:s3cmd][:aws_access_key_id] %> acl_public = False -bucket_location = US +bucket_location = <%= node[:s3cmd][:bucket_location] %> cloudfront_host = cloudfront.amazonaws.com cloudfront_resource = /2008-06-30/distribution default_mime_type = binary/octet-stream @@ -32,4 +32,4 @@ simpledb_host = sdb.amazonaws.com skip_existing = False urlencoding_mode = normal use_https = False -verbosity = WARNING \ No newline at end of file +verbosity = WARNING