Skip to content

Instantly share code, notes, and snippets.

@Maniacal
Created May 18, 2012 21:43
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/2727761 to your computer and use it in GitHub Desktop.
Save Maniacal/2727761 to your computer and use it in GitHub Desktop.
resource notification issue
remote_file "/tmp/apache-tomcat-#{node[:tomcat][:version]}.tar.gz" do
source "#{node[:app][:remote_resource]}/apache-tomcat-#{node[:tomcat][:version]}.tar.gz"
mode "0644"
action :create_if_missing
notifies :run, "bash[Unpack Tomcat]", :immediately
notifies :create, "link[#{tomcat_dir}/default]", :immediately
end
bash "Unpack Tomcat" do
cwd "#{tomcat_dir}"
code "tar -xzf /tmp/apache-tomcat-#{node[:tomcat][:version]}.tar.gz"
action :nothing
end
link "#{tomcat_dir}/default" do
to "#{unpack_dir}"
action :nothing
end
Log results:
[Fri, 18 May 2012 21:33:31 +0000] DEBUG: remote_file[/tmp/apache-tomcat-6.0.29.tar.gz] checking for file existence of /tmp/apache-tomcat-6.0.29.tar.gz
[Fri, 18 May 2012 21:33:31 +0000] DEBUG: remote_file[/tmp/apache-tomcat-6.0.29.tar.gz] creating /tmp/apache-tomcat-6.0.29.tar.gz
[Fri, 18 May 2012 21:33:31 +0000] INFO: remote_file[/tmp/apache-tomcat-6.0.29.tar.gz] updated
[Fri, 18 May 2012 21:33:31 +0000] DEBUG: Processing bash[Unpack Tomcat] on i-e471cda2
[Fri, 18 May 2012 21:33:31 +0000] INFO: Processing bash[Unpack Tomcat] action nothing (tomcat::default line 37)
[Fri, 18 May 2012 21:33:31 +0000] DEBUG: Doing nothing for bash[Unpack Tomcat]
[Fri, 18 May 2012 21:33:31 +0000] DEBUG: Processing link[/opt/tomcat/default] on i-e471cda2
[Fri, 18 May 2012 21:33:31 +0000] INFO: Processing link[/opt/tomcat/default] action nothing (tomcat::default line 43)
[Fri, 18 May 2012 21:33:31 +0000] DEBUG: Doing nothing for link[/opt/tomcat/default]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment