Problem: mongodb repos different for debian and ubuntu (#2385)

* Problem: mongodb repos different for debian and ubuntu

* Ignore errors for checking bdb process
This commit is contained in:
Muawia Khan 2018-07-23 17:38:24 +02:00 committed by GitHub
parent 42cc0d0e86
commit 75c22141ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -13,6 +13,7 @@
- name: Get Running BigchainDB Process(es)
shell: "ps aux | grep \"[b]igchaindb\" | awk '{print $2}'"
register: bdb_ps
ignore_errors: yes
when: stack_type|lower == "local"
tags: [bigchaindb]
@ -30,4 +31,4 @@
- gunicorn
ignore_errors: yes
when: stack_type|lower == "local"
tags: [bigchaindb]
tags: [bigchaindb]

View File

@ -8,7 +8,8 @@ distribution_major: "{{ ansible_distribution_major_version }}"
server_arch: "amd64,arm64"
# MongoDB Repos
mongodb_apt_repo: "deb [arch={{ server_arch }}] http://repo.mongodb.org/apt/{{ distribution_name }} {{ distribution_codename }}/{{ mongodb_package }}/{{ mongo_version }} {{'main' if ansible_distribution == 'debian' else 'multiverse'}}"
mongodb_apt_repo: "deb [arch={{ server_arch }}] http://repo.mongodb.org/apt/{{ distribution_name }} {{ distribution_codename }}/{{ mongodb_package }}/{{ mongo_version }} multiverse"
mongodb_deb_repo: "deb http://repo.mongodb.org/apt/{{ distribution_name }} {{ distribution_codename }}/{{ mongodb_package }}/{{ mongo_version }} main"
mongodb_yum_base_url: "https://repo.mongodb.org/yum/{{ ansible_os_family|lower }}/$releasever/{{ mongodb_package }}/{{ mongo_version }}/{{ ansible_architecture }}"
mongodb_dnf_base_url: "https://repo.mongodb.org/yum/{{ ansible_os_family|lower }}/7/{{ mongodb_package }}/{{ mongo_version }}/{{ ansible_architecture }}"

View File

@ -22,6 +22,15 @@
repo: "{{ mongodb_apt_repo }}"
state: present
update_cache: no
when: distribution_name == "ubuntu"
tags: [mongodb]
- name: Add MongoDB repo and update cache | deb
apt_repository:
repo: "{{ mongodb_deb_repo }}"
state: present
update_cache: no
when: distribution_name == "debian"
tags: [mongodb]
- name: Install MongoDB | apt
@ -31,4 +40,4 @@
update_cache: yes
with_items:
- "{{ mongodb_package }}"
tags: [mongodb]
tags: [mongodb]