Skip to content

Instantly share code, notes, and snippets.

@Maniacal
Created April 19, 2012 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maniacal/2418584 to your computer and use it in GitHub Desktop.
Save Maniacal/2418584 to your computer and use it in GitHub Desktop.
remote_file "/tmp/nagios_libexec.tar.gz" do
source "#{node[:app][:remote_resource]}/nagios/nagios_libexec.tar.gz"
mode "0644"
action :create_if_missing
end
bash "Unpack libexec" do
cwd "/home/nagios/libexec"
code <<-EOH
rm -rf /home/nagios/libexec/*
tar -xzf /tmp/nagios_libexec.tar.gz
chown -R nagios: /home/nagios/libexec
EOH
subscribes :run, "remote_file[/tmp/nagios_libexec.tar.gz]", :immediately
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment