mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-20 18:19:50 +00:00
Added support of MongoDB 3.6 for Debian Stretch
This commit is contained in:
parent
4cceeef64e
commit
6cf617c771
@ -31,6 +31,10 @@ env:
|
||||
DISTRIBUTION=ubuntu-upstart
|
||||
DIST_VERSION=14.04
|
||||
MONGODB_VERSION=3.2
|
||||
- >
|
||||
DISTRIBUTION=debian
|
||||
DIST_VERSION=9-builded
|
||||
MONGODB_VERSION=3.6
|
||||
- >
|
||||
DISTRIBUTION=debian
|
||||
DIST_VERSION=9-builded
|
||||
@ -71,9 +75,6 @@ env:
|
||||
DISTRIBUTION=centos
|
||||
DIST_VERSION=7-builded
|
||||
MONGODB_VERSION=3.2
|
||||
# - >
|
||||
# distribution=debian
|
||||
# version=7
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
@ -11,20 +11,23 @@
|
||||
mongodb_is_systemd: "{{ sbin_init.stat.islnk is defined and sbin_init.stat.islnk }}"
|
||||
mongodb_major_version: "{{ mongodb_version[0:3] }}"
|
||||
|
||||
- name: Overwrite mongodb_version especially for Debian 9
|
||||
set_fact:
|
||||
mongodb_major_version: "3.2"
|
||||
when: ansible_distribution_release == "stretch"
|
||||
|
||||
- name: Add APT key
|
||||
apt_key:
|
||||
keyserver: "{{ mongodb_apt_keyserver }}"
|
||||
id: "{{ mongodb_apt_key_id[mongodb_major_version] }}"
|
||||
when: mongodb_package == 'mongodb-org'
|
||||
|
||||
- name: Fail when used wrong mongodb_version variable with Debian Stretch
|
||||
fail:
|
||||
msg: "mongodb_version variable should be '3.2' or '3.6' for Debian Stretch"
|
||||
when: (mongodb_package == 'mongodb-org' and
|
||||
(mongodb_version is not defined
|
||||
or mongodb_repository[mongodb_major_version] is not defined
|
||||
or mongodb_version != "3.6"))
|
||||
|
||||
- name: Fail when used wrong mongodb_version variable
|
||||
fail:
|
||||
msg: "mongodb_version variable should be '2.6', '3.0' or '3.2'"
|
||||
msg: "mongodb_version variable should be '3.2', '3.4' or '3.6'"
|
||||
when: (mongodb_package == 'mongodb-org' and
|
||||
(mongodb_version is not defined
|
||||
or mongodb_repository[mongodb_major_version] is not defined))
|
||||
|
@ -2,7 +2,7 @@
|
||||
# -*- mode: sh; -*-
|
||||
|
||||
# File: before_install.sh
|
||||
# Time-stamp: <2018-02-15 15:54:06>
|
||||
# Time-stamp: <2018-07-12 18:05:37>
|
||||
# Copyright (C) 2018 Sergei Antipov
|
||||
# Description:
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
|
||||
mongodb_package: mongodb
|
Loading…
x
Reference in New Issue
Block a user