Created
February 20, 2015 09:31
-
-
Save alxschwarz/67c45be28f3ee8a16d0b to your computer and use it in GitHub Desktop.
Example ansible tasks for newrelic package installing
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
--- | |
- name: Install the NewRelic rpm from a remote repo | |
yum: name=http://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm state=present | |
tags: newrelic | |
- name: Temporary disabling SELinux | |
command: setenforce 0 | |
- name: Install NewRelic monitoring package | |
yum: name=newrelic-sysmond state=latest | |
register: newrelic_ready | |
tags: newrelic | |
- name: Add license to NewRelic config file | |
command: nrsysmond-config --set license_key=newrelic_key | |
notify: restart newrelic | |
when: newrelic_ready.changed | |
tags: newrelic | |
- name: Enabling SELinux back | |
command: setenforce 1 | |
- name: Start and enable newrelic-sysmond service | |
service: name=newrelic-sysmond state=started enabled=yes | |
tags: newrelic | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment