Commit 2f3331b4 by e0d

refactoring.

parent eaebc113
......@@ -16,10 +16,10 @@
#
newrelic_role_name: newrelic
COMMON_NEWRELIC_REPO: 'deb http://apt.newrelic.com/debian/ newrelic non-free'
COMMON_NEWRELIC_KEY_ID: '548C16BF'
COMMON_NEWRELIC_KEY_URL: 'https://download.newrelic.com/548C16BF.gpg'
COMMON_NEWRELIC_LICENSE_KEY: 'bad547c0367f61fc2fbcce830399d7bdfde82d74'
NEWRELIC_REPO: 'deb http://apt.newrelic.com/debian/ newrelic non-free'
NEWRELIC_KEY_ID: '548C16BF'
NEWRELIC_KEY_URL: 'https://download.newrelic.com/{{ NEWRELIC_KEY_ID }}.gpg'
NEWRELIC_LICENSE_KEY: 'NEW-RELIC-KEY'
NEWRELIC_APP_NAME: 'e0d-sandbox'
......@@ -28,6 +28,7 @@ NEWRELIC_APP_NAME: 'e0d-sandbox'
# OS packages
#
newrelic_debian_pkgs: []
newrelic_debian_pkgs:
- newrelic-sysmond
newrelic_redhat_pkgs: []
......@@ -26,18 +26,24 @@
# - newrelic
- name: add apt key
apt_key: id=548C16BF url={{COMMON_NEWRELIC_KEY_URL }} state=present
apt_key: >
id="{{ NEWRELIC_KEY_ID }}" url="{{ NEWRELIC_KEY_URL }}"
state=present
- name: install apt repository
apt_repository: repo="{{ COMMON_NEWRELIC_REPO }}" update_cache=yes
apt_repository: repo="{{ NEWRELIC_REPO }}" update_cache=yes
- name: install newrelic agent
apt: pkg="newrelic-sysmond"
- name: Install newrelic related system packages.
apt: pkg={{ item }} install_recommends=yes state=present
with_items: newrelic_debian_pkgs
- name: configure the agent with the license key
shell: >
nrsysmond-config --set license_key={{ COMMON_NEWRELIC_LICENSE_KEY }}
nrsysmond-config --set license_key="{{ NEWRELIC_LICENSE_KEY }}"
ssl=true
- name: start the newrelic system agent
shell: /etc/init.d/newrelic-sysmond start
\ No newline at end of file
- name: ensure started and enabled
service: name=newrelic-sysmond state=started enabled=yes
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment