Skip to content

Commit

Permalink
rewrite the apt sources template files to include a sysvinit and anot…
Browse files Browse the repository at this point in the history
…her upstart version; this will no longer require any other changes for future versions of ubuntu (unless there is of course a new apt source for that)
  • Loading branch information
mdxp committed Nov 14, 2012
1 parent 09ded3f commit c02c519
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 6 deletions.
12 changes: 12 additions & 0 deletions mongodb-debs/recipes/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@

return unless ["ubuntu", "debian"].include?(node[:platform])

case node["platform"]
when "ubuntu"
if (8.04..9.04).include?(node["platform_version"].to_f)
apt_repo = "mongodb.list.sysvinit.erb"
else
apt_repo = "mongodb.list.upstart.erb"
end
when "debian"
apt_repo = "mongodb.list.sysvinit.erb"
end

execute "request mongodb key" do
command "gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7F0CEB10"
not_if "gpg --list-keys 7F0CEB10"
Expand All @@ -31,6 +42,7 @@
end

template "/etc/apt/sources.list.d/mongodb.list" do
source apt_repo
mode 0644
end

Expand Down
1 change: 0 additions & 1 deletion mongodb-debs/templates/ubuntu-10.10/mongodb.list.erb

This file was deleted.

1 change: 0 additions & 1 deletion mongodb-debs/templates/ubuntu-11.04/mongodb.list.erb

This file was deleted.

1 change: 0 additions & 1 deletion mongodb-debs/templates/ubuntu-11.10/mongodb.list.erb

This file was deleted.

1 change: 0 additions & 1 deletion mongodb-debs/templates/ubuntu-12.04/mongodb.list.erb

This file was deleted.

1 change: 0 additions & 1 deletion mongodb-debs/templates/ubuntu-9.04/mongodb.list.erb

This file was deleted.

1 change: 0 additions & 1 deletion mongodb-debs/templates/ubuntu-9.10/mongodb.list.erb

This file was deleted.

0 comments on commit c02c519

Please sign in to comment.