mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-02-17 15:36:23 +00:00
Trying to get Docker tests to work by running tests in privileged containers and installing EPEL repository for CentOS image.
This commit is contained in:
parent
d6997059cb
commit
429e108551
@ -1,5 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Establish some role-related facts
|
||||
set_fact:
|
||||
mongodb_major_version: "{{ mongodb_version[0:3] }}"
|
||||
|
||||
- name: Add YUM repository
|
||||
template:
|
||||
src: mongodb.repo.j2
|
||||
@ -16,12 +20,28 @@
|
||||
- "{{ mongodb_package }}"
|
||||
- numactl
|
||||
|
||||
# This step is needed when running CentOS in Docker since the docker image does not come with EPEL installed by default
|
||||
- name: Install EPEL release
|
||||
yum:
|
||||
name: epel-release
|
||||
state: present
|
||||
|
||||
- name: Install PyMongo package
|
||||
yum:
|
||||
name: python-pymongo
|
||||
state: latest
|
||||
when: not mongodb_pymongo_from_pip
|
||||
|
||||
# - name: Install python-devel
|
||||
# yum:
|
||||
# name: "python-devel"
|
||||
# when: mongodb_pymongo_from_pip
|
||||
|
||||
# - name: Install PIP
|
||||
# yum:
|
||||
# name: "python-pip"
|
||||
# when: mongodb_pymongo_from_pip
|
||||
|
||||
- name: Install PIP
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
|
@ -11,11 +11,12 @@
|
||||
image: "{{ image_name }}"
|
||||
command: "/sbin/init"
|
||||
state: started
|
||||
privileged: true
|
||||
with_items:
|
||||
- mongo1
|
||||
- mongo2
|
||||
- mongo3
|
||||
|
||||
|
||||
- hosts: "{{ target }}"
|
||||
become: no
|
||||
gather_facts: yes
|
||||
|
Loading…
x
Reference in New Issue
Block a user