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:
jsaliba 2017-09-14 08:57:16 +02:00
parent d6997059cb
commit 429e108551
2 changed files with 22 additions and 1 deletions

View File

@ -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 }}"

View File

@ -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