Skip to content

Instantly share code, notes, and snippets.

@metmajer
Last active Feb 17, 2016
Embed
What would you like to do?
Blog: How to Automate Enterprise Application Monitoring with Ansible
-agentpath:/opt/dynatrace/agent/lib/libdtagent.so=name=java-agent,collector=dynatrace.company.com
# file: production
[balancers]
www.example.com
[webservers]
www[0-1].example.com
[appservers]
app[a:c].example.com
[databases]
db.example.com
[monitoring]
dynatrace.example.com
# file: appservers.yml
---
- hosts: appservers
tasks:
- name: Install Apache Tomcat
apt: name=tomcat7
remote_user: deploy
sudo: yes
---
- hosts: appservers
roles:
- role: common
- role: tomcat7
remote_user: deploy
sudo: yes
# file: playbook.yml
---
- hosts: webservers
roles:
- role: Dynatrace.Dynatrace-NGINX-Agent
remote_user: deploy
- hosts: appservers
roles:
- role: Dynatrace.Dynatrace-Tomcat-Agent
dynatrace_tomcat_agent_env_var_file_name: /usr/share/tomcat7/bin/catalina.sh
remote_user: deploy
# file: production
[webservers]
www[0-1].example.com
[appservers]
app[a:c].example.com
Dynatrace.Dynatrace-NGINX-Agent
Dynatrace.Dynatrace-Tomcat-Agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment