2017-06-12 19:37:41 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Pre-seed package configuration with app name
|
2023-03-19 11:44:53 +01:00
|
|
|
ansible.builtin.debconf:
|
2017-06-12 19:37:41 +02:00
|
|
|
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
|
2021-05-09 23:06:42 +02:00
|
|
|
when: newrelic_appname | length > 0
|
2017-06-12 19:37:41 +02:00
|
|
|
|
|
|
|
- name: Pre-seed package configuration with license
|
2023-03-19 11:44:53 +01:00
|
|
|
ansible.builtin.debconf:
|
2017-06-12 19:37:41 +02:00
|
|
|
name: newrelic-php5
|
|
|
|
question: "newrelic-php5/license-key"
|
|
|
|
value: "{{ newrelic_license }}"
|
|
|
|
vtype: "string"
|
2021-05-09 23:06:42 +02:00
|
|
|
when: newrelic_license | length > 0
|
2017-06-12 19:37:41 +02:00
|
|
|
|
2017-06-13 11:20:34 +02:00
|
|
|
- name: list newrelic config files
|
2023-03-19 11:44:53 +01:00
|
|
|
ansible.builtin.shell:
|
|
|
|
cmd: "find /etc/php* -type f -name newrelic.ini"
|
2023-03-16 14:35:12 +01:00
|
|
|
changed_when: False
|
2017-06-13 11:20:34 +02:00
|
|
|
check_mode: no
|
|
|
|
register: find_newrelic_ini
|
|
|
|
|
|
|
|
- name: Disable AWS detection
|
2023-03-19 11:44:53 +01:00
|
|
|
ansible.builtin.lineinfile:
|
2017-06-13 11:20:34 +02:00
|
|
|
dest: "{{ item }}"
|
|
|
|
regexp: '^;?newrelic.daemon.utilization.detect_aws'
|
|
|
|
line: 'newrelic.daemon.utilization.detect_aws = false'
|
2021-05-04 14:18:40 +02:00
|
|
|
loop: "{{ find_newrelic_ini.stdout_lines }}"
|
2017-06-13 11:20:34 +02:00
|
|
|
|
|
|
|
- name: Disable Docker detection
|
2023-03-19 11:44:53 +01:00
|
|
|
ansible.builtin.lineinfile:
|
2017-06-13 11:20:34 +02:00
|
|
|
dest: "{{ item }}"
|
|
|
|
regexp: '^;?newrelic.daemon.utilization.detect_docker'
|
|
|
|
line: 'newrelic.daemon.utilization.detect_docker = false'
|
2021-05-04 14:18:40 +02:00
|
|
|
loop: "{{ find_newrelic_ini.stdout_lines }}"
|
2017-06-13 11:20:34 +02:00
|
|
|
|
2017-06-12 19:37:41 +02:00
|
|
|
- name: Install package for PHP
|
2023-03-19 11:44:53 +01:00
|
|
|
ansible.builtin.apt:
|
2017-06-12 19:37:41 +02:00
|
|
|
name: newrelic-php5
|
2018-05-18 09:33:25 +02:00
|
|
|
state: present
|