roles/mongodb: Add MongoDB deployment
The *mongodb* role installs MongoDB from the *mongodb.org* Yum repository and manages basic server configuration.
This commit is contained in:
18
roles/mongodb/tasks/main.yml
Normal file
18
roles/mongodb/tasks/main.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
- name: ensure mongodb package repository is available
|
||||
template:
|
||||
src=mongodb.repo.j2
|
||||
dest=/etc/yum.repos.d/mongodb.repo
|
||||
mode=0644
|
||||
tags:
|
||||
- install
|
||||
- name: ensure mongodb is installed
|
||||
package:
|
||||
name: mongodb-org-server
|
||||
state: present
|
||||
tags:
|
||||
- install
|
||||
|
||||
- name: ensure mongodb server starts at boot
|
||||
service:
|
||||
name=mongod
|
||||
enabled=yes
|
||||
Reference in New Issue
Block a user