2017-06-12 19:37:41 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Pre-seed package configuration with app name
|
|
|
|
debconf:
|
|
|
|
name: newrelic-php5
|
|
|
|
question: "newrelic-php5/application-name"
|
2017-06-13 09:30:07 +02:00
|
|
|
value: "{{ newrelic_appname }}"
|
2017-06-12 19:37:41 +02:00
|
|
|
vtype: string
|
2017-06-13 09:30:07 +02:00
|
|
|
when: newrelic_appname != ""
|
2017-06-12 19:37:41 +02:00
|
|
|
|
|
|
|
- name: Pre-seed package configuration with license
|
|
|
|
debconf:
|
|
|
|
name: newrelic-php5
|
|
|
|
question: "newrelic-php5/license-key"
|
|
|
|
value: "{{ newrelic_license }}"
|
|
|
|
vtype: "string"
|
|
|
|
when: newrelic_license != ""
|
|
|
|
|
2017-06-13 11:20:34 +02:00
|
|
|
- name: list newrelic config files
|
|
|
|
shell: "find /etc/php* -type f -name newrelic.ini"
|
|
|
|
changed_when: false
|
|
|
|
check_mode: no
|
|
|
|
register: find_newrelic_ini
|
|
|
|
|
|
|
|
- name: Disable AWS detection
|
|
|
|
lineinfile:
|
|
|
|
dest: "{{ item }}"
|
|
|
|
regexp: '^;?newrelic.daemon.utilization.detect_aws'
|
|
|
|
line: 'newrelic.daemon.utilization.detect_aws = false'
|
|
|
|
with_items: "{{ find_newrelic_ini.stdout_lines }}"
|
|
|
|
|
|
|
|
- name: Disable Docker detection
|
|
|
|
lineinfile:
|
|
|
|
dest: "{{ item }}"
|
|
|
|
regexp: '^;?newrelic.daemon.utilization.detect_docker'
|
|
|
|
line: 'newrelic.daemon.utilization.detect_docker = false'
|
|
|
|
with_items: "{{ find_newrelic_ini.stdout_lines }}"
|
|
|
|
|
2017-06-12 19:37:41 +02:00
|
|
|
- name: Install package for PHP
|
|
|
|
apt:
|
|
|
|
name: newrelic-php5
|
2018-05-18 09:33:25 +02:00
|
|
|
state: present
|