Commit c5dc1cf9 by e0d

initial working version, needs var refactoring

parent 750de2e5
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Defaults for role newrelic
#
#
# vars are namespace with the module name.
#
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_APP_NAME: 'e0d-sandbox'
#
# OS packages
#
newrelic_debian_pkgs: []
newrelic_redhat_pkgs: []
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Handlers for role newrelic
#
# Overview:
#
#
- name: notify me
debug: msg="stub handler"
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Role includes for role newrelic
#
# Example:
#
# dependencies:
# - {
# role: my_role
# my_role_var0: "foo"
# my_role_var1: "bar"
# }
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Tasks for role newrelic
#
# Overview:
#
# Installs and configures the newrelic system monitoring agent
#
# Dependencies:
#
#
# Example play:
#
#
- name: add apt key
apt_key: id=548C16BF url={{COMMON_NEWRELIC_KEY_URL }} state=present
- name: install apt repository
apt_repository: repo="{{ COMMON_NEWRELIC_REPO }}" update_cache=yes
- name: install newrelic agent
apt: pkg="newrelic-sysmond"
- name: configure the agent with the license key
shell: nrsysmond-config --set license_key={{ COMMON_NEWRELIC_LICENSE_KEY }} ssl=true
- name: start the newrelic system agent
shell: /etc/init.d/newrelic-sysmond start
\ 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