Moved EPEL installation command to Docker file. Travis now uses custom Docker image built from CentOS Dockerfile. nolog re-enabled for user admin checking.
This commit is contained in:
parent
9bb46f2f20
commit
986678b733
|
@ -53,7 +53,7 @@ env:
|
||||||
# MONGODB_VERSION=3.2
|
# MONGODB_VERSION=3.2
|
||||||
- >
|
- >
|
||||||
DISTRIBUTION=centos
|
DISTRIBUTION=centos
|
||||||
DIST_VERSION=7
|
DIST_VERSION=7-builded
|
||||||
MONGODB_VERSION=3.4
|
MONGODB_VERSION=3.4
|
||||||
# - >
|
# - >
|
||||||
# distribution=ubuntu-upstart
|
# distribution=ubuntu-upstart
|
||||||
|
|
|
@ -20,12 +20,6 @@
|
||||||
- "{{ mongodb_package }}"
|
- "{{ mongodb_package }}"
|
||||||
- numactl
|
- 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
|
- name: Install PyMongo package
|
||||||
yum:
|
yum:
|
||||||
name: python-pymongo
|
name: python-pymongo
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
when: mongodb_replication_replset and mongodb_replication_replset != ''
|
when: mongodb_replication_replset and mongodb_replication_replset != ''
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
- name: Check user admin is exists
|
- name: Check where admin user already exists
|
||||||
command: >
|
command: >
|
||||||
mongo --quiet -u {{ mongodb_user_admin_name }} \
|
mongo --quiet -u {{ mongodb_user_admin_name }} \
|
||||||
-p {{ mongodb_user_admin_password }} --port {{ mongodb_net_port }} --eval 'db.version()' admin
|
-p {{ mongodb_user_admin_password }} --port {{ mongodb_net_port }} --eval 'db.version()' admin
|
||||||
|
|
||||||
register: mongodb_user_admin_check
|
register: mongodb_user_admin_check
|
||||||
changed_when: false
|
changed_when: false
|
||||||
always_run: yes # side-effect free, so it can be run in check-mode as well
|
always_run: yes # side-effect free, so it can be run in check-mode as well
|
||||||
|
@ -39,7 +38,7 @@
|
||||||
when: ( mongodb_security_authorization == 'enabled'
|
when: ( mongodb_security_authorization == 'enabled'
|
||||||
and (not mongodb_replication_replset
|
and (not mongodb_replication_replset
|
||||||
or mongodb_replication_replset == '') )
|
or mongodb_replication_replset == '') )
|
||||||
# no_log: true
|
no_log: true
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
- name: Include authorization configuration
|
- name: Include authorization configuration
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
FROM centos:7
|
FROM centos:7
|
||||||
|
|
||||||
# This is needed so that ansible managed to read "ansible_default_ipv4"
|
# This is needed so that ansible managed to read "ansible_default_ipv4"
|
||||||
RUN yum install iproute
|
RUN yum install iproute -y
|
||||||
|
|
||||||
|
# This step is needed since standard CentOS docker image does not come with EPEL installed by default
|
||||||
|
RUN yum install epel-release
|
||||||
|
|
||||||
# we can has SSH
|
# we can has SSH
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
|
|
||||||
# pepare for takeoff
|
# pepare for takeoff
|
||||||
CMD ["/usr/sbin/init"]
|
CMD ["/usr/sbin/init"]
|
||||||
|
|
Loading…
Reference in New Issue