Skip to content

Instantly share code, notes, and snippets.

@abdallah
Created November 30, 2016 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdallah/4e384f1035b36667645dd9a0e35b79c3 to your computer and use it in GitHub Desktop.
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)
---
- 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