-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from justinsaliba/redhat-support
Redhat support
- Loading branch information
Showing
16 changed files
with
195 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
tests/*.retry | ||
*~ | ||
\#*\# | ||
.\#* | ||
/.python-version | ||
/.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
|
||
- name: Establish some role-related facts | ||
set_fact: | ||
mongodb_major_version: "{{ mongodb_version[0:3] }}" | ||
|
||
- name: Install EPEL release repository | ||
package: | ||
name: epel-release | ||
state: present | ||
|
||
- name: Add YUM repository | ||
template: | ||
src: mongodb.repo.j2 | ||
dest: /etc/yum.repos.d/mongodb.repo | ||
mode: 0644 | ||
with_items: "{{ mongodb_version[0:3] }}" | ||
when: mongodb_package == 'mongodb-org' | ||
|
||
- name: Install MongoDB package | ||
yum: | ||
name: "{{ item }}" | ||
state: present | ||
with_items: | ||
- "{{ mongodb_package }}" | ||
- numactl | ||
|
||
- name: Install PyMongo package | ||
yum: | ||
name: python-pymongo | ||
state: latest | ||
when: not mongodb_pymongo_from_pip | ||
|
||
- name: Install PIP | ||
yum: | ||
name: "{{ item }}" | ||
with_items: | ||
- python-devel | ||
- python-pip | ||
when: mongodb_pymongo_from_pip | ||
|
||
- name: Install PyMongo from PIP | ||
pip: | ||
name: pymongo | ||
state: latest | ||
when: mongodb_pymongo_from_pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[mongodb-org-{{ mongodb_version }}] | ||
name=MongoDB {{ mongodb_version }} Repository | ||
baseurl={{ mongodb_repository[item] }} | ||
gpgcheck={{ mongodb_repository_gpgkey[item] is defined | ternary(1,0) }} | ||
{% if mongodb_repository_gpgkey[item] is defined %} | ||
gpgkey={{ mongodb_repository_gpgkey[item] }} | ||
{% endif %} | ||
enabled=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM centos:6 | ||
|
||
# This is needed so that ansible managed to read "ansible_default_ipv4" | ||
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 -y | ||
|
||
# we can has SSH | ||
EXPOSE 22 | ||
|
||
# pepare for takeoff | ||
CMD ["/usr/sbin/init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM centos:7 | ||
|
||
# This is needed so that ansible managed to read "ansible_default_ipv4" | ||
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 -y | ||
|
||
# This step is needed since standard CentOS docker image does not come with init-functions installed by default. | ||
# This package seems to be required for Mongo 3.2 and downwards | ||
RUN yum install initscripts -y | ||
|
||
# we can has SSH | ||
EXPOSE 22 | ||
|
||
# pepare for takeoff | ||
CMD ["/usr/sbin/init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
|
||
mongodb_repository: | ||
"2.6": "http://downloads-distro.mongodb.org/repo/redhat/os/$basearch/" | ||
"3.0": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/$basearch/" | ||
"3.2": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/$basearch/" | ||
"3.4": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/$basearch/" | ||
|
||
mongodb_repository_gpgkey: | ||
"3.2": "https://www.mongodb.org/static/pgp/server-3.2.asc" | ||
"3.4": "https://www.mongodb.org/static/pgp/server-3.4.asc" | ||
|
||
mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}" |