mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-26 21:09:49 +00:00
33 lines
829 B
YAML
33 lines
829 B
YAML
---
|
|
- name: Install MMS agent (Debian)
|
|
apt:
|
|
deb: "{{ mongodb_mms_agent_pkg }}"
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
|
|
|
- name: Install MMS agent (RHEL)
|
|
yum:
|
|
name: "{{ mongodb_mms_agent_pkg }}"
|
|
state: present
|
|
when: ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat'
|
|
|
|
- name: Configure the MMS agent pt. 1
|
|
file:
|
|
state: directory
|
|
path: /etc/mongodb-mms
|
|
owner: "{{ mongodb_user }}"
|
|
group: "{{ mongodb_user }}"
|
|
mode: 0755
|
|
|
|
- name: Configure the MMS agent pt. 2
|
|
template:
|
|
src: monitoring-agent.config.j2
|
|
dest: /etc/mongodb-mms/monitoring-agent.config
|
|
notify: mongodb-mms-monitoring-agent restart
|
|
|
|
- name: Ensure that the MMS agent is started
|
|
service:
|
|
name: mongodb-mms-monitoring-agent
|
|
state: started
|
|
enabled: yes
|
|
|