Skip to content

Commit 5b3623f

Browse files
committed
MMS Agent can now be installed on RHEL distributions.
1 parent 349383f commit 5b3623f

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

tasks/mms-agent.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
---
22

3-
- name: Install MMS agent pt. 1
3+
- name: Download MMS Agent (Debian)
44
get_url: url={{mongodb_mms_agent_pkg}} dest={{mongodb_storage_dbpath}}/mms-agent.deb
55
register: mongodb_mms_agent_loaded
6+
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
67

7-
- name: Install MMS agent pt. 2
8-
apt: deb={{mongodb_storage_dbpath}}/mms-agent.deb
9-
when: mongodb_mms_agent_loaded.changed
8+
- name: Download MMS Agent (RHEL)
9+
get_url: url={{mongodb_mms_agent_pkg}} dest={{mongodb_storage_dbpath}}/mms-agent.rpm
10+
register: mongodb_mms_agent_loaded
11+
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
12+
13+
- name: Install MMS agent (Debian)
14+
apt:
15+
deb: "{{mongodb_storage_dbpath}}/mms-agent.deb"
16+
when: mongodb_mms_agent_loaded.changed and (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu')
17+
18+
- name: Install MMS agent (RHEL)
19+
yum:
20+
name: "{{mongodb_storage_dbpath}}/mms-agent.rpm"
21+
state: present
22+
when: mongodb_mms_agent_loaded.changed and (ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux')
1023

1124
- name: Configure the MMS agent pt. 1
1225
file: state=directory path=/etc/mongodb-mms owner={{mongodb_user}} group={{mongodb_user}} mode=0755

0 commit comments

Comments
 (0)