Browse files

Merge pull request #5 from tas50/COOK-1638

COOK-1638: Address foodcritic warnings.  Mostly adding Scientific Linux support
  • Loading branch information...
2 parents e941b0e + e34219b commit b35a59de25371ec8caa96ff42047ca4a024af74d @jtimberman committed Oct 11, 2012
Showing with 13 additions and 12 deletions.
  1. +1 −0 README.md
  2. +1 −1 attributes/default.rb
  3. +1 −1 metadata.rb
  4. +1 −1 recipes/apache-proxy.rb
  5. +3 −3 recipes/nginx-proxy.rb
  6. +1 −1 recipes/rabbitmq.rb
  7. +5 −5 recipes/rubygems-install.rb
View
1 README.md
@@ -103,6 +103,7 @@ The following attributes are chosen based on the platform and set accordingly. S
* centos
* fedora
* amazon
+* scientific
* openbsd
* freebsd
* mac\_os\_x
View
2 attributes/default.rb
@@ -24,7 +24,7 @@
default["chef_server"]["run_path"] = "/var/run/chef"
default["chef_server"]["cache_path"] = "/var/cache/chef"
default["chef_server"]["backup_path"] = "/var/lib/chef/backup"
-when "debian","ubuntu","redhat","centos","fedora","amazon"
+when "debian","ubuntu","redhat","centos","fedora","amazon","scientific"
default["chef_server"]["init_style"] = "init"
default["chef_server"]["path"] = "/var/lib/chef"
default["chef_server"]["run_path"] = "/var/run/chef"
View
2 metadata.rb
@@ -9,7 +9,7 @@
recipe "chef-server::apache-proxy", "Configures Apache2 proxy for API and WebUI"
recipe "chef-server::nginx-proxy", "Configures NGINX proxy for API and WebUI"
-%w{ ubuntu debian redhat centos fedora amazon freebsd openbsd }.each do |os|
+%w{ ubuntu debian redhat centos fedora amazon scientific freebsd openbsd }.each do |os|
supports os
end
View
2 recipes/apache-proxy.rb
@@ -41,7 +41,7 @@
directory "/etc/chef/certificates" do
owner "chef"
group root_group
- mode "700"
+ mode 0700
end
bash "Create SSL Certificates" do
View
6 recipes/nginx-proxy.rb
@@ -28,7 +28,7 @@
directory "/etc/chef/certificates" do
owner "chef"
group root_group
- mode "700"
+ mode 0700
end
bash "Create SSL Certificates" do
@@ -42,11 +42,11 @@
not_if { ::File.exists?("/etc/chef/certificates/chef-server-proxy.pem") }
end
-template "#{node[:nginx][:dir]}/sites-available/chef_server_proxy.conf" do
+template "#{node['nginx']['dir']}/sites-available/chef_server_proxy.conf" do
source "chef_server.nginx.conf.erb"
owner "root"
group "root"
- mode "0644"
+ mode 0644
notifies :restart, "service[nginx]"
variables(
:api_server_name => node['chef_server']['proxy']['api_server_name'],
View
2 recipes/rabbitmq.rb
@@ -44,7 +44,7 @@ def debian_before_squeeze?
end
service "rabbitmq-server" do
- if platform?("centos","redhat","fedora","amazon")
+ if platform?("centos","redhat","fedora","amazon","scientific")
start_command "/sbin/service rabbitmq-server start &> /dev/null"
stop_command "/sbin/service rabbitmq-server stop &> /dev/null"
end
View
10 recipes/rubygems-install.rb
@@ -57,7 +57,7 @@
include_recipe "chef-server::rabbitmq"
include_recipe "gecode"
-when "centos","redhat","fedora","amazon"
+when "centos","redhat","fedora","amazon","scientific"
include_recipe "couchdb"
include_recipe "java"
@@ -193,12 +193,12 @@
dist_dir = value_for_platform(
["ubuntu", "debian"] => { "default" => "debian" },
- ["redhat", "centos", "fedora", "amazon"] => { "default" => "redhat"}
+ ["redhat", "centos", "fedora", "amazon", "scientific"] => { "default" => "redhat"}
)
conf_dir = value_for_platform(
["ubuntu", "debian"] => { "default" => "default" },
- ["redhat", "centos", "fedora", "amazon"] => { "default" => "sysconfig"}
+ ["redhat", "centos", "fedora", "amazon", "scientific"] => { "default" => "sysconfig"}
)
chef_version = node['chef_packages']['chef']['version']
@@ -221,7 +221,7 @@
to "#{node['languages']['ruby']['bin_dir']}/#{svc}"
end
- service "#{svc}" do
+ service svc do
supports :status => true
action [ :enable, :start ]
end
@@ -269,4 +269,4 @@
log("Could not determine service init style, manual intervention required to set up server services.")
-end
+end

0 comments on commit b35a59d

Please sign in to comment.