forked from evolix/ansible-roles
34 lines
718 B
YAML
34 lines
718 B
YAML
|
---
|
||
|
|
||
|
- name: MongoDB public GPG Key
|
||
|
apt_key:
|
||
|
# url: https://www.mongodb.org/static/pgp/server-3.4.asc
|
||
|
data: "{{ lookup('file', 'server-3.4.asc') }}"
|
||
|
|
||
|
- name: enable APT sources list
|
||
|
apt_repository:
|
||
|
repo: deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main
|
||
|
state: present
|
||
|
filename: mongodb
|
||
|
update_cache: yes
|
||
|
|
||
|
- name: Install packages
|
||
|
apt:
|
||
|
name: mongodb-org
|
||
|
state: installed
|
||
|
|
||
|
- name: Custom configuration
|
||
|
template:
|
||
|
src: mongod_jessie.conf.j2
|
||
|
dest: "/etc/mongod.conf"
|
||
|
force: yes
|
||
|
backup: no
|
||
|
notify: restart mongod
|
||
|
|
||
|
- name: Configure logrotate
|
||
|
template:
|
||
|
src: logrotate_jessie.j2
|
||
|
dest: /etc/logrotate.d/mongodb
|
||
|
force: yes
|
||
|
backup: no
|