This is an example to install the newrelic-sysmond package on the Puppet Agent.
class system::newrelic-sysmond ($licensekey) { package { "newrelic-sysmond": ensure => installed, } exec { 'Insert newrelic license key': command => "nrsysmond-config --set license_key=$licensekey", require => Package['newrelic-sysmond'], creates => '/etc/newrelic/key_added', } exec { 'Restart newrelic system monitor': command => "/etc/init.d/newrelic-sysmond start", require => Exec['Insert newrelic license key'], creates => '/etc/newrelic/key_added', } exec { 'Create the key_added file': command => "echo key_added > /etc/newrelic/key_added", require => Exec['Restart newrelic system monitor'], creates => '/etc/newrelic/key_added', } }
Done =)
Filed under: New Relic, Puppet Tagged: Continuous Integration, New Relic, Puppet
