Skip to content

Commit 986678b

Browse files
committed
Moved EPEL installation command to Docker file. Travis now uses custom Docker image built from CentOS Dockerfile. nolog re-enabled for user admin checking.
1 parent 9bb46f2 commit 986678b

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ env:
5353
# MONGODB_VERSION=3.2
5454
- >
5555
DISTRIBUTION=centos
56-
DIST_VERSION=7
56+
DIST_VERSION=7-builded
5757
MONGODB_VERSION=3.4
5858
# - >
5959
# distribution=ubuntu-upstart

tasks/install.redhat.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
- "{{ mongodb_package }}"
2121
- numactl
2222

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-
2923
- name: Install PyMongo package
3024
yum:
3125
name: python-pymongo

tasks/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,18 @@
2727
when: mongodb_replication_replset and mongodb_replication_replset != ''
2828
tags: [mongodb]
2929

30-
- name: Check user admin is exists
30+
- name: Check where admin user already exists
3131
command: >
3232
mongo --quiet -u {{ mongodb_user_admin_name }} \
3333
-p {{ mongodb_user_admin_password }} --port {{ mongodb_net_port }} --eval 'db.version()' admin
34-
3534
register: mongodb_user_admin_check
3635
changed_when: false
3736
always_run: yes # side-effect free, so it can be run in check-mode as well
3837
ignore_errors: true
3938
when: ( mongodb_security_authorization == 'enabled'
4039
and (not mongodb_replication_replset
4140
or mongodb_replication_replset == '') )
42-
# no_log: true
41+
no_log: true
4342
tags: [mongodb]
4443

4544
- name: Include authorization configuration

tests/Dockerfile.centos_7-builded

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
FROM centos:7
22

33
# This is needed so that ansible managed to read "ansible_default_ipv4"
4-
RUN yum install iproute
4+
RUN yum install iproute -y
5+
6+
# This step is needed since standard CentOS docker image does not come with EPEL installed by default
7+
RUN yum install epel-release
58

69
# we can has SSH
710
EXPOSE 22
811

912
# pepare for takeoff
10-
CMD ["/usr/sbin/init"]
13+
CMD ["/usr/sbin/init"]

0 commit comments

Comments
 (0)