Skip to content

Commit 429e108

Browse files
committed
Trying to get Docker tests to work by running tests in privileged containers and installing EPEL repository for CentOS image.
1 parent d699705 commit 429e108

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

tasks/install.redhat.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
22

3+
- name: Establish some role-related facts
4+
set_fact:
5+
mongodb_major_version: "{{ mongodb_version[0:3] }}"
6+
37
- name: Add YUM repository
48
template:
59
src: mongodb.repo.j2
@@ -16,12 +20,28 @@
1620
- "{{ mongodb_package }}"
1721
- numactl
1822

23+
# This step is needed when running CentOS in Docker since the docker image does not come with EPEL installed by default
24+
- name: Install EPEL release
25+
yum:
26+
name: epel-release
27+
state: present
28+
1929
- name: Install PyMongo package
2030
yum:
2131
name: python-pymongo
2232
state: latest
2333
when: not mongodb_pymongo_from_pip
2434

35+
# - name: Install python-devel
36+
# yum:
37+
# name: "python-devel"
38+
# when: mongodb_pymongo_from_pip
39+
40+
# - name: Install PIP
41+
# yum:
42+
# name: "python-pip"
43+
# when: mongodb_pymongo_from_pip
44+
2545
- name: Install PIP
2646
yum:
2747
name: "{{ item }}"

tests/site.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
image: "{{ image_name }}"
1212
command: "/sbin/init"
1313
state: started
14+
privileged: true
1415
with_items:
1516
- mongo1
1617
- mongo2
1718
- mongo3
18-
19+
1920
- hosts: "{{ target }}"
2021
become: no
2122
gather_facts: yes

0 commit comments

Comments
 (0)