Commit 5ba1d413 authored by Felipe Salum's avatar Felipe Salum
Browse files

Merge pull request #23 from covermymeds/php-exec-path

Use the facter value of $::path for newrelic php install
parents b91d077f 0f723ad1
......@@ -34,6 +34,7 @@ class newrelic::agent::php (
$newrelic_php_package_ensure = 'present',
$newrelic_php_service_ensure = 'running',
$newrelic_php_conf_dir = $::newrelic::params::newrelic_php_conf_dir,
$newrelic_php_exec_path = $::path,
$newrelic_php_package = $::newrelic::params::newrelic_php_package,
$newrelic_php_service = $::newrelic::params::newrelic_php_service,
$newrelic_license_key = undef,
......@@ -90,6 +91,7 @@ class newrelic::agent::php (
}
::newrelic::php::newrelic_ini { $newrelic_php_conf_dir:
exec_path => $newrelic_php_exec_path,
newrelic_license_key => $newrelic_license_key,
before => [ File['/etc/newrelic/newrelic.cfg'], Service[$newrelic_php_service] ],
require => Package[$newrelic_php_package],
......
# This module should not be used directly. It is used by newrelic::php.
define newrelic::php::newrelic_ini (
$newrelic_license_key
$newrelic_license_key,
$exec_path,
) {
exec { "/usr/bin/newrelic-install ${name}":
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
path => $exec_path,
command => "/usr/bin/newrelic-install purge ; NR_INSTALL_SILENT=yes, NR_INSTALL_KEY=${newrelic_license_key} /usr/bin/newrelic-install install",
provider => 'shell',
user => 'root',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment