refactoring
This commit is contained in:
parent
a0ca07c3ab
commit
19e868e238
9
handlers/main.yml
Normal file
9
handlers/main.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: Restart mongodb
|
||||||
|
systemd:
|
||||||
|
name: mongod
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
daemon_reload: yes
|
||||||
|
listen:
|
||||||
|
- "mongod_restart"
|
@ -1,14 +1,21 @@
|
|||||||
---
|
---
|
||||||
- name: add mongodb repo
|
- block:
|
||||||
yum-repository:
|
- name: Add mongodb repo
|
||||||
name: mongodb-org-3.4
|
yum-repository:
|
||||||
description: MongoDB Repository
|
name: mongodb-org-3.4
|
||||||
baseurl: https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
|
description: MongoDB Repository
|
||||||
gpgcheck: yes
|
baseurl: https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
|
||||||
enabled: yes
|
gpgcheck: yes
|
||||||
gpgkey: https://www.mongodb.org/static/pgp/server-3.4.asc
|
enabled: yes
|
||||||
|
gpgkey: https://www.mongodb.org/static/pgp/server-3.4.asc
|
||||||
|
notify:
|
||||||
|
- mongod_restart
|
||||||
|
|
||||||
- name: install mongodb package
|
- name: Install mongodb package
|
||||||
package:
|
package:
|
||||||
name: 'mongodb-org'
|
name: 'mongodb-org'
|
||||||
state: latest
|
state: latest
|
||||||
|
notify:
|
||||||
|
- mongod_restart
|
||||||
|
become: True
|
||||||
|
become_user: root
|
||||||
|
Loading…
Reference in New Issue
Block a user