Skip to content

Instantly share code, notes, and snippets.

@jacoyutorius
Created November 7, 2013 23:03
Show Gist options
  • Save jacoyutorius/7363396 to your computer and use it in GitHub Desktop.
Save jacoyutorius/7363396 to your computer and use it in GitHub Desktop.
Testlink用
#
# Cookbook Name:: testlink
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
package "vim" do
action :install
end
package "mysql-server" do
action :install
end
package "mysql-devel" do
action :install
end
package "php" do
action :install
end
package "php-mbstring" do
action :install
end
package "httpd" do
action :install
end
service "httpd" do
supports :status => true, :restart => true, :reload => true
action [:enable, :start]
end
service "mysqld" do
supports :restart => true, :reload => true
action :enable
end
service "iptables" do
Chef::Log.info("Stop iptables.")
action [:disable, :stop]
end
testlink_fileurl = "http://downloads.sourceforge.net/project/testlink/TestLink%201.9/TestLink%201.9.7/testlink-1.9.7.tar.gz"
testlink_filename = "testlink-1.9.7"
testlink_filepath = "/tmp/#{testlink_filename}.tar.gz"
remote_file testlink_filepath do
source testlink_fileurl
end
bash "testlink_xzvf" do
user "root"
code <<-EOH
sudo tar xzvf #{testlink_filepath}
sudo rm -rf #{testlink_filepath}
sudo mv #{testlink_filename} /var/www/html
EOH
not_if { ::File.exists?(testlink_filepath) }
end
# not_if { ::File.exists?(testlink_filepath) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment