Created
June 23, 2011 19:48
-
-
Save xdissent/1043452 to your computer and use it in GitHub Desktop.
My changes to ataritech's collectd cookbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r atari/collectd/definitions/collectd_plugin.rb cookbooks/collectd/definitions/collectd_plugin.rb | |
25c25 | |
< if params[:template].blank? | |
--- | |
> if params[:template].nil? || params[:template].empty? | |
diff -r atari/collectd/metadata.rb cookbooks/collectd/metadata.rb | |
7c7,12 | |
< supports "ubuntu" | |
--- | |
> | |
> %w{debian ubuntu}.each do |os| | |
> supports os | |
> end | |
> | |
> depends "git" | |
\ No newline at end of file | |
diff -r atari/collectd/recipes/client.rb cookbooks/collectd/recipes/client.rb | |
23,24c23,28 | |
< search(:node, 'recipes:"collectd::server"') do |n| | |
< servers << n['fqdn'] | |
--- | |
> if Chef::Config[:solo] && node[:recipes].include?("collectd::server") | |
> servers << node[:fqdn] | |
> else | |
> search(:node, 'recipes:"collectd\:\:server"') do |n| | |
> servers << n['fqdn'] | |
> end | |
diff -r atari/collectd/recipes/collectd_web.rb cookbooks/collectd/recipes/collectd_web.rb | |
19a20 | |
> include_recipe "git" | |
23,26c24,27 | |
< directory node[:collectd][:collectd_web][:path] do | |
< owner "root" | |
< group "root" | |
< mode "755" | |
--- | |
> %w{libjson-perl libhtml-entities-numbered-perl libhtml-parser-perl librrds-perl}.each do |pkg| | |
> package pkg do | |
> action :install | |
> end | |
29c30,51 | |
< bash "install_collectd_web" do | |
--- | |
> # directory node[:collectd][:collectd_web][:path] do | |
> # owner "root" | |
> # group "root" | |
> # mode "755" | |
> # end | |
> # | |
> # bash "install_collectd_web" do | |
> # user "root" | |
> # cwd node[:collectd][:collectd_web][:path] | |
> # not_if do | |
> # File.exists?(File.join(node[:collectd][:collectd_web][:path], "index.html")) | |
> # end | |
> # code <<-EOH | |
> # wget --no-check-certificate -O collectd-web.tar.gz https://github.com/httpdss/collectd-web/tarball/master | |
> # tar --strip-components=1 -xzf collectd-web.tar.gz | |
> # rm collectd-web.tar.gz | |
> # EOH | |
> # end | |
> | |
> git node[:collectd][:collectd_web][:path] do | |
> repository "git://github.com/xdissent/collectd-web.git" | |
> reference "master" | |
31,39c53,55 | |
< cwd node[:collectd][:collectd_web][:path] | |
< not_if do | |
< File.exists?(File.join(node[:collectd][:collectd_web][:path], "index.html")) | |
< end | |
< code <<-EOH | |
< wget --no-check-certificate -O collectd-web.tar.gz https://github.com/httpdss/collectd-web/tarball/master | |
< tar --strip-components=1 -xzf collectd-web.tar.gz | |
< rm collectd-web.tar.gz | |
< EOH | |
--- | |
> group "root" | |
> action :sync | |
> notifies :restart, resources(:service => "apache2") | |
46a63 | |
> notifies :restart, resources(:service => "apache2") | |
diff -r atari/collectd/recipes/default.rb cookbooks/collectd/recipes/default.rb | |
21c21,26 | |
< package_name "collectd-core" | |
--- | |
> case node[:platform] | |
> when "ubuntu" | |
> package_name "collectd-core" | |
> when "debian" | |
> package_name "collectd" | |
> end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment