26 lines
660 B
YAML
26 lines
660 B
YAML
---
|
|
- block:
|
|
- 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"
|
|
|
|
- name: Install packages
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
with_items:
|
|
- mongodb-org
|
|
- python2-pip
|
|
become: True
|
|
|
|
- name: Install pymongo as ansible dependency
|
|
pip:
|
|
name: pymongo
|
|
state: present
|
|
extra_args: --user
|