Permalink
Browse files

now with more idempotency

  • Loading branch information...
1 parent 0585df3 commit 1de945e774bf2d7371944d5afa4874bea97a5c13 @dje dje committed Jan 19, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 metadata.rb
  2. +2 −2 recipes/debian.rb
View
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs/Configures newrelic"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "0.2.4"
+version "0.2.5"
supports "ubuntu"
supports "debian"
View
@@ -3,13 +3,13 @@
execute "add newrelic key to gpg" do
command "gpg --keyserver pgp.mit.edu --homedir /root " +
"--recv-keys #{node[:newrelic][:key_id]}"
- not_if "gpg --list-keys #{node[:newrelic][:key_id]}"
+ not_if "gpg --list-keys --homedir /root | grep 'New Relic'"
end
execute "add newrelic key to apt" do
command "gpg --homedir /root --armor " +
"--export #{node[:newrelic][:key_id]} | apt-key add -"
- not_if "apt-get key list #{node[:newrelic][:key_id]}"
+ not_if "apt-key list | grep 'New Relic'"
end
apt_repository "newrelic" do

3 comments on commit 1de945e

Contributor

smith replied Jan 19, 2012

Could this all be skipped with newer apt cookbooks? See https://github.com/cramerdev/cookbooks/blob/master/newrelic/recipes/debian.rb (haven't had time for a pull req.)

Contributor

dje replied Jan 19, 2012

Probably so. Any chance I could talk you into merging those changes into this repo?

Contributor

smith replied Jan 19, 2012

Please sign in to comment.