2017-07-14 21:05:30 +00:00
|
|
|
---
|
2017-12-22 11:59:12 +00:00
|
|
|
- block:
|
2018-07-06 22:05:37 +00:00
|
|
|
- name: Add repository for major version '{{ mongodb_version }}'
|
|
|
|
yum_repository:
|
|
|
|
name: mongodb
|
|
|
|
description: MongoDB Repository
|
|
|
|
baseurl: "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/{{ mongodb_version }}/x86_64/"
|
|
|
|
gpgcheck: yes
|
|
|
|
enabled: yes
|
|
|
|
gpgkey: "https://www.mongodb.org/static/pgp/server-{{ mongodb_version }}.asc"
|
2017-07-14 21:05:30 +00:00
|
|
|
|
2018-07-07 17:20:29 +00:00
|
|
|
- name: Install packages
|
2018-07-06 22:05:37 +00:00
|
|
|
package:
|
2018-07-07 17:20:29 +00:00
|
|
|
name: "{{ item }}"
|
2018-07-06 22:05:37 +00:00
|
|
|
state: present
|
2018-07-07 17:20:29 +00:00
|
|
|
with_items:
|
|
|
|
- mongodb-org
|
|
|
|
- python2-pip
|
2018-07-07 17:12:50 +00:00
|
|
|
become: True
|
2017-12-22 12:34:38 +00:00
|
|
|
|
2018-07-07 17:12:50 +00:00
|
|
|
- name: Install pymongo as ansible dependency
|
|
|
|
pip:
|
|
|
|
name: pymongo
|
2018-07-07 17:20:29 +00:00
|
|
|
state: present
|
2018-07-07 17:12:50 +00:00
|
|
|
extra_args: --user
|