-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved new relic java installation to a separate task as this role is …
…going to support more new relic agents
- Loading branch information
Lars Blumberg
committed
Feb 13, 2015
1 parent
f277a74
commit 051c8c2
Showing
6 changed files
with
94 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,21 @@ | ||
--- | ||
# defaults file for yetu.newrelic-jvm | ||
# defaults file for ansible-newrelic-agent | ||
|
||
# New relic installation settings | ||
newrelic_license_key : False | ||
newrelic_jar_version : "3.13.0" | ||
newrelic_jar_app_name : "Witwe Bolte" | ||
newrelic_jar_dir : "/tmp/newrelic" | ||
newrelic_jar_user : root | ||
newrelic_jar_group : root | ||
newrelic_app_name : "Witwe Bolte" | ||
newrelic_license_key : False | ||
newrelic_java_install_agent : False | ||
newrelic_nodejs_install_agent : False | ||
|
||
# New relic run configuration | ||
newrelic_jar_high_security : false | ||
newrelic_jar_enable_auto_app_naming : false | ||
newrelic_jar_enable_auto_transaction_naming : true | ||
newrelic_jar_log_level : info | ||
newrelic_jar_audit_mode : false | ||
newrelic_jar_log_file_count : 1 | ||
newrelic_jar_log_limit_in_kbytes : 0 | ||
newrelic_jar_log_daily : false | ||
newrelic_jar_log_file_name : newrelic_agent.log | ||
newrelic_jar_ssl : true | ||
newrelic_jar_max_stack_trace_lines : 30 | ||
|
||
#TODO: Provide these attributes here | ||
#newrelic_jar_attributes : | ||
# enabled: yes | ||
# auto_instrument: true | ||
#newrelic_transaction_tracer_* | ||
|
||
newrelic_jar_base_url : "http://download.newrelic.com/newrelic/java-agent/newrelic-agent" | ||
newrelic_jar_filename : "newrelic-agent-{{ newrelic_jar_version }}.jar" | ||
newrelic_jar_url : "{{ newrelic_jar_base_url }}/{{ newrelic_jar_version }}/{{ newrelic_jar_filename }}" | ||
newrelic_jar_config_file : "{{ newrelic_jar_dir }}/newrelic.yml" | ||
|
||
#TODO: This line is to be removed as soon as we have accomplished the base role | ||
#/home/apphome/workspace/home-services/bin/home-services -Dhttp.port=8085 -Dconfig.file=/home/apphome/workspace/home-services/conf/application-dev.conf -J-javaagent:/tmp/newrelic/newrelic-agent-3.13.0.jar -J-Dnewrelic.environment=dev | ||
newrelic_high_security : false | ||
newrelic_enable_auto_app_naming : false | ||
newrelic_enable_auto_transaction_naming : true | ||
newrelic_log_level : info | ||
newrelic_audit_mode : false | ||
newrelic_log_file_count : 1 | ||
newrelic_log_limit_in_kbytes : 0 | ||
newrelic_log_daily : false | ||
newrelic_log_file_name : newrelic_agent.log | ||
newrelic_ssl : true | ||
newrelic_max_stack_trace_lines : 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
# defaults file for ansible-newrelic-agent | ||
|
||
# Newrelic java installation settings | ||
newrelic_java_version : "3.13.0" | ||
newrelic_java_dir : "/tmp/newrelic" | ||
newrelic_java_user : root | ||
newrelic_java_group : root | ||
|
||
# Dynamic installation properties, don't need to be overwritten | ||
newrelic_java_base_url : "http://download.newrelic.com/newrelic/java-agent/newrelic-agent" | ||
newrelic_java_filename : "newrelic-agent-{{ newrelic_java_version }}.jar" | ||
newrelic_java_url : "{{ newrelic_java_base_url }}/{{ newrelic_java_version }}/{{ newrelic_java_filename }}" | ||
newrelic_java_config_file : "{{ newrelic_java_dir }}/newrelic.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
# handlers file for yetu.newrelic-jvm | ||
# handlers file for ansible-newrelic-agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,5 @@ | ||
--- | ||
- name: Check for newrelic_license_key | ||
fail: | ||
msg: "newrelic_license_key has not been defined" | ||
when: newrelic_license_key|default(False) == False | ||
|
||
- name: main | Debug | ||
debug: | ||
var=newrelic_jar_url | ||
|
||
- name: main | Create newrelic-jar target directory | ||
file: | ||
path="{{ newrelic_jar_dir }}" | ||
state=directory | ||
owner="{{ newrelic_jar_user }}" | ||
group="{{ newrelic_jar_group }}" | ||
mode=0755 | ||
|
||
- name: main | Download newrelic.jar | ||
get_url: | ||
url="{{ newrelic_jar_url }}" | ||
dest="{{ newrelic_jar_dir }}" | ||
owner="{{ newrelic_jar_user }}" | ||
group="{{ newrelic_jar_group }}" | ||
mode=0644 | ||
|
||
- name: main | Create version-less symbolic link for newrelic.jar file | ||
file: | ||
src="{{ newrelic_jar_dir }}/{{ newrelic_jar_filename }}" | ||
dest="{{ newrelic_jar_dir }}/newrelic-agent.jar" | ||
owner="{{ newrelic_jar_user }}" | ||
group="{{ newrelic_jar_group }}" | ||
state=link | ||
|
||
- name: main | Configure new relic | ||
template: | ||
src=newrelic.yml.j2 | ||
dest="{{ newrelic_jar_config_file }}" | ||
owner="{{ newrelic_jar_user }}" | ||
group="{{ newrelic_jar_group }}" | ||
mode=0644 | ||
- name: main | Execute newrelic java role | ||
include: "newrelic_java.yml" | ||
when: newrelic_java_install_agent|default(False) == True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
|
||
- include_vars: ../defaults/newrelic_java.yml | ||
|
||
- name: Check for newrelic_license_key | ||
fail: | ||
msg: "newrelic_license_key has not been defined" | ||
when: newrelic_license_key|default(False) == False | ||
|
||
- name: main | Debug | ||
debug: | ||
var=newrelic_java_url | ||
|
||
- name: main | Create newrelic-jar target directory | ||
file: | ||
path="{{ newrelic_java_dir }}" | ||
state=directory | ||
owner="{{ newrelic_java_user }}" | ||
group="{{ newrelic_java_group }}" | ||
mode=0755 | ||
|
||
- name: main | Download newrelic.jar | ||
get_url: | ||
url="{{ newrelic_java_url }}" | ||
dest="{{ newrelic_java_dir }}" | ||
owner="{{ newrelic_java_user }}" | ||
group="{{ newrelic_java_group }}" | ||
mode=0644 | ||
|
||
- name: main | Create version-less symbolic link for newrelic.jar file | ||
file: | ||
src="{{ newrelic_java_dir }}/{{ newrelic_java_filename }}" | ||
dest="{{ newrelic_java_dir }}/newrelic-agent.jar" | ||
owner="{{ newrelic_java_user }}" | ||
group="{{ newrelic_java_group }}" | ||
state=link | ||
|
||
- name: main | Configure new relic | ||
template: | ||
src=newrelic_java.yml.j2 | ||
dest="{{ newrelic_java_config_file }}" | ||
owner="{{ newrelic_java_user }}" | ||
group="{{ newrelic_java_group }}" | ||
mode=0644 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters