From d05268e601213aa651a9ae5f65b17948e2128338 Mon Sep 17 00:00:00 2001 From: Guillaume Dedrie Date: Mon, 25 Aug 2014 14:11:43 +0200 Subject: [PATCH] Support Debian machine using MongoDB official repository for Debian --- meta/main.yml | 3 +++ tasks/install.deb.yml | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/meta/main.yml b/meta/main.yml index 7141c03..787bdda 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -11,5 +11,8 @@ galaxy_info: - name: Ubuntu versions: - all + - name: Debian + versions: + - wheezy categories: - database:nosql diff --git a/tasks/install.deb.yml b/tasks/install.deb.yml index fae2c8a..0e64a6b 100644 --- a/tasks/install.deb.yml +++ b/tasks/install.deb.yml @@ -3,8 +3,13 @@ - name: Add APT key apt_key: url=http://docs.mongodb.org/10gen-gpg-key.asc id=7F0CEB10 -- name: Add APT repository +- name: Add APT repository (Ubuntu) apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' update_cache=yes + when: ansible_distribution == 'Ubuntu' + +- name: Add APT repository (Debian) + apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' update_cache=yes + when: ansible_distribution == 'Debian' - name: Install mongodb-org apt: pkg={{item}}