]> git.openstreetmap.org Git - chef.git/commitdiff
Only run apt-update when a new source is added
authorTom Hughes <tom@compton.nu>
Wed, 11 Feb 2015 00:44:52 +0000 (00:44 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 11 Feb 2015 00:44:52 +0000 (00:44 +0000)
cookbooks/apt/resources/source.rb

index 2839b29b64c8853d9d63cd7bc6b5d682d6f01436..8669857c7437c04f06ab1c4a3c79f6f244ab15b5 100644 (file)
@@ -32,5 +32,5 @@ def initialize(name, run_context = nil)
 end
 
 def after_created
-  notifies :run, "execute[apt-update]", :immediately
+  notifies :run, "execute[apt-update]", :immediately if @action == :create
 end