Skip to content

Commit

Permalink
now with more idempotency
Browse files Browse the repository at this point in the history
  • Loading branch information
dje committed Jan 19, 2012
1 parent 0585df3 commit 1de945e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metadata.rb
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions recipes/debian.rb
Expand Up @@ -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
Expand Down

3 comments on commit 1de945e

@smith
Copy link
Contributor

@smith smith commented on 1de945e Jan 19, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

@dje
Copy link
Contributor Author

@dje dje commented on 1de945e Jan 19, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@smith
Copy link
Contributor

@smith smith commented on 1de945e Jan 19, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.