Skip to content

Instantly share code, notes, and snippets.

@abdallah
Created November 30, 2016 15:53
Embed
What would you like to do?
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