diff --git a/newrelic-php/tasks/main.yml b/newrelic-php/tasks/main.yml index eb8928ea..c5ce2fe5 100644 --- a/newrelic-php/tasks/main.yml +++ b/newrelic-php/tasks/main.yml @@ -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