Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
c9f7ed75
Commit
c9f7ed75
authored
Sep 06, 2017
by
nadeemshahzad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update role for 16.04
parent
0a0667a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
playbooks/roles/mongo_mms/defaults/main.yml
+1
-0
playbooks/roles/mongo_mms/tasks/main.yml
+20
-5
No files found.
playbooks/roles/mongo_mms/defaults/main.yml
View file @
c9f7ed75
...
...
@@ -2,6 +2,7 @@
base_url
:
"
https://cloud.mongodb.com/download/agent"
pkg_arch
:
"
amd64"
pkg_format
:
"
deb"
os_version
:
"
ubuntu1604"
agents
:
-
agent
:
mongodb-mms-monitoring-agent
...
...
playbooks/roles/mongo_mms/tasks/main.yml
View file @
c9f7ed75
...
...
@@ -10,18 +10,26 @@
msg
:
"
MMSAPIKEY
is
required"
when
:
MMSAPIKEY is not defined
-
name
:
download mongo mms agent
-
name
:
download
trusty
mongo mms agent
get_url
:
url
:
"
{{
base_url
}}/{{
item.dir
}}/{{
item.agent
}}_{{
item.version
}}_{{
pkg_arch
}}.{{
pkg_format
}}"
dest
:
"
/tmp/{{
item.agent
}}-{{
item.version
}}.{{
pkg_format
}}"
register
:
download_mms_deb
with_items
:
"
{{
agents
}}"
when
:
ansible_distribution_release == 'trusty'
-
name
:
download xenial mongo mms agent
get_url
:
url
:
"
{{
base_url
}}/{{
item.dir
}}/{{
item.agent
}}_{{
item.version
}}_{{
pkg_arch
}}.{{
os_version
}}.{{
pkg_format
}}"
dest
:
"
/tmp/{{
item.agent
}}-{{
item.version
}}.{{
pkg_format
}}"
register
:
download_mms_deb
with_items
:
"
{{
agents
}}"
when
:
ansible_distribution_release == 'xenial'
-
name
:
install mongo mms agent
apt
:
deb
:
"
/tmp/{{
item.agent
}}-{{
item.version
}}.deb"
when
:
download_mms_deb.changed
notify
:
restart mms
with_items
:
"
{{
agents
}}"
-
name
:
add group ID to monitoring-agent.config
...
...
@@ -29,7 +37,6 @@
dest
:
"
{{
item.config
}}"
regexp
:
"
^mmsGroupId="
line
:
"
mmsGroupId={{
MMSGROUPID
}}"
notify
:
restart mms
with_items
:
"
{{
agents
}}"
-
name
:
add key to monitoring-agent.config
...
...
@@ -37,11 +44,19 @@
dest
:
"
{{
item.config
}}"
regexp
:
"
^mmsApiKey="
line
:
"
mmsApiKey={{
MMSAPIKEY
}}"
notify
:
restart mms
with_items
:
"
{{
agents
}}"
-
name
:
start mms service
-
name
:
start mms service
trusty
service
:
name
:
"
{{
item.agent
}}"
state
:
started
with_items
:
"
{{
agents
}}"
when
:
ansible_distribution_release == 'trusty'
-
name
:
start mms service xenial
systemd
:
name
:
"
{{
item.agent
}}"
state
:
started
with_items
:
"
{{
agents
}}"
when
:
ansible_distribution_release == 'xenial'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment