weareinteractive.php5_newrelic

Ansible weareinteractive.php5_newrelic 角色

构建状态 Galaxy GitHub 标签 GitHub 星标

weareinteractive.php5_newrelic 是一个 Ansible 角色,功能如下:

  • 安装 newrelic php 代理
  • 配置 newrelic php 代理

注意:由于密钥无效,测试失败

安装

使用 ansible-galaxy

$ ansible-galaxy install weareinteractive.php5_newrelic

使用 requirements.yml

- src: weareinteractive.php5_newrelic

使用 git

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

依赖

  • Ansible >= 2.4 注意:

由于 Ansible Galaxy 现已支持 组织,此角色已从 franklinkim.php5-newrelic 移动到 weareinteractive.php5-newrelic!

变量

以下是该角色的所有默认变量,也可以在 defaults/main.yml 中找到。

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

# 设置日志消息发送的文件名。
php5_newrelic_logfile: /var/log/newrelic/php_agent.log
# 设置日志文件中包括的详细级别。
php5_newrelic_loglevel: info
# 设置守护进程日志消息发送的文件名。
php5_newrelic_daemon_logfile: /var/log/newrelic/newrelic-daemon.log
# 设置守护进程日志中包括的详细级别。
php5_newrelic_daemon_loglevel: info
# 为所有应用程序启用高安全性。
php5_newrelic_high_security: no
# 设置指标将报告到的应用程序名称。
php5_newrelic_appname: myapp
# 设置 newrelic.ini 文件的目标位置
# 注意:对于 php7,位置为 /etc/php/7.0/mods-available
php5_newrelic_config_dest: /etc/php5/mods-available
# 将其他配置选项写入 newrelic.ini。
php5_newrelic_extra_config: {}

使用

这是一个示例剧本:

---
- 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 }}"

测试

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

贡献

没有正式的风格指南,请注意保持现有的编码风格。为任何新的或更改的功能添加单元测试和示例。

  1. 分叉项目
  2. 创建功能分支 (git checkout -b my-new-feature)
  3. 提交更改 (git commit -am '添加一些功能')
  4. 推送到分支 (git push origin my-new-feature)
  5. 创建新的拉取请求

注意:要更新 README.md 文件,请安装并运行 ansible-role

$ gem install ansible-role
$ ansible-role docgen

许可证

版权所有 (c) We Are Interactive,采用 MIT 许可证。

关于项目

Installs New Relic PHP agent

安装
ansible-galaxy install weareinteractive.php5_newrelic
许可证
mit
下载
71.6k