Created
November 30, 2016 15:53
-
-
Save abdallah/4e384f1035b36667645dd9a0e35b79c3 to your computer and use it in GitHub Desktop.
Install New Relic Infrastructure agent on all my servers using Ansible playbook (Ubuntu)
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
--- | |
- hosts: all | |
tasks: | |
- lineinfile: "dest=/etc/newrelic-infra.yml line='license_key: YOURKEYHERE' create=yes state=present" | |
- apt_key: | |
state=present | |
url=https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | |
- apt_repository: "repo='deb [arch=amd64] http://download.newrelic.com/infrastructure_agent/linux/apt {{ansible_distribution_release}} main' state=present update_cache=yes" | |
- apt: name=newrelic-infra |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment