diff --git a/attributes/default.rb b/attributes/default.rb index 42bb637..7ca0632 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -5,6 +5,6 @@ default[:s3cmd][:aws_access_key_id] = "" default[:s3cmd][:aws_secret_access_key] = "" -default[:s3cmd][:version] = "v1.1.0-beta3" +default[:s3cmd][:version] = "v1.0.1" 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/metadata.json b/metadata.json index 55dd5ca..4756545 100644 --- a/metadata.json +++ b/metadata.json @@ -6,7 +6,9 @@ "maintainer_email": "enis@speeddate.com", "license": "Apache 2.0", "platforms": { - "ubuntu": ">= 0.0.0" + "ubuntu": ">= 0.0.0", + "centos": ">= 0.0.0", + "redhat": ">= 0.0.0" }, "dependencies": { }, diff --git a/metadata.rb b/metadata.rb index 596cdfc..e93595b 100644 --- a/metadata.rb +++ b/metadata.rb @@ -8,3 +8,5 @@ recipe "s3cmd", "Installs and configures s3cmd" supports "ubuntu" +supports "centos" +supports "redhat" diff --git a/recipes/default.rb b/recipes/default.rb index f78efb8..718bb8a 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -3,8 +3,25 @@ # Recipe:: default # -package "git-core" -package "python-setuptools" + +case node[:platform] + when "centos", "redhat" + + %w{git}.each do |pkg| + package pkg do + action :install + end + end + + when "ubuntu", "debian" + + %w{git-core python-setuptools}.each do |pkg| + package pkg do + action :install + end + end +end + directory "#{node[:s3cmd][:install_prefix_root]}/share/s3cmd" do action :create