This repository was archived by the owner on May 20, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 2828 mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm'
2929 mms_agent_file = '/root/mongodb-mms-automation-agent-manager-latest.x86_64.rpm'
3030 when 'debian'
31- mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.deb'
32- mms_agent_file = '/root/mongodb-mms-automation-agent-manager_latest_amd64.deb'
31+ if node [ 'platform' ] == 'ubuntu' && node [ 'platform_version' ] . to_f >= 15.04
32+ mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.ubuntu1604.deb'
33+ mms_agent_file = '/root/mongodb-mms-automation-agent-manager_latest_amd64.ubuntu1604.deb'
34+ else
35+ mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.deb'
36+ mms_agent_file = '/root/mongodb-mms-automation-agent-manager_latest_amd64.deb'
37+ end
3338end
3439
3540# Download the mms automation agent manager latest
7883service 'mongodb-mms-automation-agent' do
7984 # The service provider of MMS Agent for Ubuntu is upstart
8085 provider Chef ::Provider ::Service ::Upstart if node [ 'platform_family' ] == 'debian'
86+ provider Chef ::Provider ::Service ::Systemd if node [ 'platform' ] == 'ubuntu' && node [ 'platform_version' ] . to_f >= 15.04
8187 supports :status => true , :restart => true , :stop => true
8288 action [ :enable , :start ]
8389end
Original file line number Diff line number Diff line change 2828 mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent-latest.x86_64.rpm'
2929 mms_agent_file = '/root/mongodb-mms-monitoring-agent-latest.x86_64.rpm'
3030 when 'debian'
31- mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_latest_amd64.deb'
32- mms_agent_file = '/root/mongodb-mms-monitoring-agent_latest_amd64.deb'
31+ if node [ 'platform' ] == 'ubuntu' && node [ 'platform_version' ] . to_f >= 15.04
32+ mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_latest_amd64.ubuntu1604.deb'
33+ mms_agent_file = '/root/mongodb-mms-monitoring-agent_latest_amd64.ubuntu1604.deb'
34+ else
35+ mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_latest_amd64.deb'
36+ mms_agent_file = '/root/mongodb-mms-monitoring-agent_latest_amd64.deb'
37+ end
3338end
3439
3540# Download the mms automation agent manager latest
6772service 'mongodb-mms-monitoring-agent' do
6873 # The service provider of MMS Agent for Ubuntu is upstart
6974 provider Chef ::Provider ::Service ::Upstart if node [ 'platform_family' ] == 'debian'
75+ provider Chef ::Provider ::Service ::Systemd if node [ 'platform' ] == 'ubuntu' && node [ 'platform_version' ] . to_f >= 15.04
7076 supports :status => true , :restart => true , :stop => true
7177 action [ :enable , :start ]
7278end
You can’t perform that action at this time.
0 commit comments