weareinteractive.php5_newrelic

Ansible weareinteractive.php5_newrelic Role

Build Status Galaxy GitHub Tags GitHub Stars

weareinteractive.php5_newrelic is an Ansible role that:

  • Installs the New Relic PHP agent.
  • Configures the New Relic PHP agent.

Note: Tests are failing because of an invalid key.

Installation

To install using ansible-galaxy:

$ ansible-galaxy install weareinteractive.php5_newrelic

To install using requirements.yml:

- src: weareinteractive.php5_newrelic

To install using git:

$ git clone https://github.com/weareinteractive/ansible-php5-newrelic.git weareinteractive.php5_newrelic

Dependencies

  • Requires Ansible version 2.4 or higher.

Note:

This role has moved from franklinkim.php5-newrelic to weareinteractive.php5-newrelic because Ansible Galaxy now supports organizations.

Variables

Here are the default variables for this role, found in defaults/main.yml.

---
# newrelic_license_key: yourkey
# php5_newrelic_extra_config:
#   newrelic.enabled: true

# Log file for the PHP agent.
php5_newrelic_logfile: /var/log/newrelic/php_agent.log
# Log level for the log file.
php5_newrelic_loglevel: info
# Log file for the daemon.
php5_newrelic_daemon_logfile: /var/log/newrelic/newrelic-daemon.log
# Log level for the daemon log.
php5_newrelic_daemon_loglevel: info
# Enables high security for all applications.
php5_newrelic_high_security: no
# Name of the application where metrics will be reported.
php5_newrelic_appname: myapp
# Destination for the newrelic.ini file.
# Note: For PHP 7, the path is /etc/php/7.0/mods-available
php5_newrelic_config_dest: /etc/php5/mods-available
# Additional config options for newrelic.ini.
php5_newrelic_extra_config: {}

Usage

Here’s an example of a playbook:

---
- hosts: all
  become: yes
  roles:
    - weareinteractive.apt
    - weareinteractive.php5
    - franklinkim.newrelic
    - weareinteractive.php5-newrelic
  vars:
    newrelic_license_key: ab2fa361cd4d0d373833cad619d7bcc424d27c16
    php5_newrelic_appname: "My App"
    php5_newrelic_extra_config:
      newrelic.enabled: true
    php5_newrelic_config_dest: "{{ php5_module_path }}"

Testing

To test the role, run the following commands:

$ git clone https://github.com/weareinteractive/ansible-php5-newrelic.git
$ cd ansible-php5-newrelic
$ make test

Contributing

To contribute to this project, follow these steps:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push your branch (git push origin my-new-feature).
  5. Create a new Pull Request.

Note: To update the README.md, install and run ansible-role:

$ gem install ansible-role
$ ansible-role docgen

License

Copyright (c) We Are Interactive under the MIT license.

Informazioni sul progetto

Installs New Relic PHP agent

Installa
ansible-galaxy install weareinteractive.php5_newrelic
Licenza
mit
Download
71.6k
Proprietario