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
edx
configuration
Commits
fd101d08
Commit
fd101d08
authored
Jun 05, 2016
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YAML style parameters passing
parent
dc1c4159
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
26 deletions
+35
-26
playbooks/roles/newrelic/defaults/main.yml
+3
-0
playbooks/roles/newrelic/handlers/main.yml
+0
-3
playbooks/roles/newrelic/tasks/main.yml
+32
-23
No files found.
playbooks/roles/newrelic/defaults/main.yml
View file @
fd101d08
...
...
@@ -21,6 +21,8 @@ NEWRELIC_DEBIAN_KEY_ID: '548C16BF'
NEWRELIC_DEBIAN_KEY_URL
:
'
https://download.newrelic.com/{{
NEWRELIC_DEBIAN_KEY_ID
}}.gpg'
NEWRELIC_LICENSE_KEY
:
"
SPECIFY_KEY_HERE"
NEWRELIC_AMAZON_REPO
:
'
https://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm'
#
# OS packages
#
...
...
@@ -30,3 +32,4 @@ newrelic_debian_pkgs:
newrelic_redhat_pkgs
:
-
newrelic-sysmond
playbooks/roles/newrelic/handlers/main.yml
deleted
100644 → 0
View file @
dc1c4159
---
-
name
:
restart newrelic-logwatch-agent
service
:
name=newrelic-logwatch-agent state=restarted
playbooks/roles/newrelic/tasks/main.yml
View file @
fd101d08
...
...
@@ -25,37 +25,43 @@
# roles:
# - newrelic
-
name
:
add apt key
apt_key
:
>
id="{{ NEWRELIC_DEBIAN_KEY_ID }}" url="{{ NEWRELIC_DEBIAN_KEY_URL }}"
state=present
-
name
:
Add apt key for New Relic
apt_key
:
id
:
"
{{
NEWRELIC_DEBIAN_KEY_ID
}}"
url
:
"
{{
NEWRELIC_DEBIAN_KEY_URL
}}"
state
:
present
when
:
ansible_distribution == 'Ubuntu'
-
name
:
Configure the New Relic Servers yum repository
shell
:
>
rpm -Uvh https://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
creates=/etc/yum.repos.d/newrelic.repo
when
:
ansible_distribution == 'Amazon'
-
name
:
install apt repository
apt_repository
:
repo="{{ NEWRELIC_DEBIAN_REPO }}" update_cache=yes
when
:
ansible_distribution == 'Ubuntu'
-
name
:
install newrelic agent (apt)
apt
:
pkg="newrelic-sysmond"
-
name
:
Install apt repository for New Relic
apt_repository
:
repo
:
"
{{
NEWRELIC_DEBIAN_REPO
}}"
state
:
present
update_cache
:
yes
when
:
ansible_distribution == 'Ubuntu'
-
name
:
Install newrelic related system packages for Ubuntu
apt
:
pkg={{ item }} install_recommends=yes state=present
with_items
:
newrelic_debian_pkgs
apt
:
name
:
"
{{
item
}}"
install_recommends
:
yes
state
:
present
with_items
:
"
{{
newrelic_debian_pkgs
}}"
when
:
ansible_distribution == 'Ubuntu'
-
name
:
Configure the New Relic Servers yum repository
yum
:
name
:
"
{{
NEWRELIC_AMAZON_REPO
}}"
state
:
present
when
:
ansible_distribution == 'Amazon'
-
name
:
Install newrelic related system packages for Amazon
yum
:
pkg={{ item }} state=present
with_items
:
newrelic_redhat_pkgs
yum
:
name
:
"
{{
item
}}"
state
:
present
update_cache
:
yes
with_items
:
"
{{
newrelic_redhat_pkgs
}}"
when
:
ansible_distribution == 'Amazon'
-
name
:
c
onfigure the agent
-
name
:
C
onfigure the agent
template
:
src
:
"
etc/newrelic/nrsysmond.cfg.j2"
dest
:
"
/etc/newrelic/nrsysmond.cfg"
...
...
@@ -63,5 +69,8 @@
group
:
"
newrelic"
mode
:
0640
-
name
:
ensure started and enabled
service
:
name=newrelic-sysmond state=restarted enabled=yes
-
name
:
Ensure started and enabled
service
:
name
:
newrelic-sysmond
state
:
restarted
enabled
:
yes
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