TvL2386.php7-newrelic
is an Ansible role, forked from franklinkim.php5-newrelic v1.2.2 which:
- installs newrelic php agent
- configures newrelic php agent
Using ansible-galaxy
:
$ ansible-galaxy install TvL2386.php7-newrelic
Using requirements.yml
:
- src: TvL2386.php7-newrelic
Using git
:
$ git clone https://github.com/TvL2386/ansible-php7-newrelic.git TvL2386.php7-newrelic
- Ansible >= 2.0
Here is a list of all the default variables for this role, which are also available in defaults/main.yml
.
---
# newrelic_license_key: yourkey
# Sets the name of the file to send log messages to.
php7_newrelic_logfile: /var/log/newrelic/php_agent.log
# Sets the level of detail to include in the log file.
php7_newrelic_loglevel: info
# Sets the name of the file to send daemon log messages to.
php7_newrelic_daemon_logfile: /var/log/newrelic/newrelic-daemon.log
# Sets the level of detail to include in the daemon log.
php7_newrelic_daemon_loglevel: info
# Enables high security for all applications.
php7_newrelic_high_security: no
# Sets the name of the application that metrics will be reported into.
php7_newrelic_appname: myapp
# Sets the desination location of the newrelic.ini file
php7_newrelic_config_dest: /etc/php7/mods-available
# Sets wether apache, in this case, should be restarted
php7_newrelic_php_daemon_notify: no
php7_newrelic_php_daemon_notify_handler: restart apache
This is an example playbook:
---
- hosts: all
roles:
- geerlingguy.apache
- geerlingguy.php
- franklinkim.newrelic
- TvL2386.php7-newrelic
vars:
newrelic_license_key: ab2fa361cd4d0d373833cad619d7bcc424d27c16
php7_newrelic_appname: "My App"
php7_newrelic_php_daemon_notify: yes
php7_newrelic_php_daemon_notify_handler: restart apache
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests and examples for any new or changed functionality.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) TvL2386 under the MIT license.