newrelic-php: properly disable AWS/Docker detection

This commit is contained in:
Jérémy Lecour 2017-06-13 11:20:34 +02:00 committed by Jérémy Lecour
parent 9dd7a62492
commit 2670c5a8ce

View file

@ -18,6 +18,26 @@
vtype: "string"
when: newrelic_license != ""
- 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 }}"
- name: Install package for PHP
apt:
name: newrelic-php5