Newrelic: merge roles
This commit is contained in:
parent
9caf04e01f
commit
13b4fbb6bb
|
@ -1,14 +0,0 @@
|
||||||
# newrelic-php
|
|
||||||
|
|
||||||
Installation of NewRelic PHP agent.
|
|
||||||
|
|
||||||
## Tasks
|
|
||||||
|
|
||||||
Everything is in the `tasks/main.yml` file.
|
|
||||||
|
|
||||||
A license key and an application name can be provided to pre-configure the agent.
|
|
||||||
|
|
||||||
## Variables
|
|
||||||
|
|
||||||
* `newrelic_license`: license key (default: empty).
|
|
||||||
* `newrelic_appname`: application name (default: empty).
|
|
|
@ -1,19 +0,0 @@
|
||||||
galaxy_info:
|
|
||||||
author: Evolix
|
|
||||||
description: Installation of NewRelic PHP agent.
|
|
||||||
|
|
||||||
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
|
|
||||||
|
|
||||||
license: GPLv2
|
|
||||||
|
|
||||||
min_ansible_version: 2.2
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: Debian
|
|
||||||
versions:
|
|
||||||
- jessie
|
|
||||||
|
|
||||||
dependencies: []
|
|
||||||
# List your role dependencies here, one per line.
|
|
||||||
# Be sure to remove the '[]' above if you add dependencies
|
|
||||||
# to this list.
|
|
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
driver:
|
|
||||||
name: docker
|
|
||||||
privileged: true
|
|
||||||
use_sudo: false
|
|
||||||
|
|
||||||
provisioner:
|
|
||||||
name: ansible_playbook
|
|
||||||
hosts: test-kitchen
|
|
||||||
roles_path: ../
|
|
||||||
ansible_verbose: true
|
|
||||||
require_ansible_source: false
|
|
||||||
require_chef_for_busser: false
|
|
||||||
idempotency_test: true
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: debian
|
|
||||||
driver_config:
|
|
||||||
image: evolix/ansible:2.2.1
|
|
||||||
|
|
||||||
suites:
|
|
||||||
- name: default
|
|
||||||
provisioner:
|
|
||||||
name: ansible_playbook
|
|
||||||
playbook: ./tests/test.yml
|
|
||||||
|
|
||||||
transport:
|
|
||||||
max_ssh_sessions: 6
|
|
|
@ -1,9 +0,0 @@
|
||||||
# newrelic-sources
|
|
||||||
|
|
||||||
Installation of NewRelic repository for APT sources.
|
|
||||||
|
|
||||||
## Tasks
|
|
||||||
|
|
||||||
Everything is in the `tasks/main.yml` file.
|
|
||||||
|
|
||||||
NB : the repository key is store in the role and not fetched online, for performance reasons.
|
|
|
@ -1,19 +0,0 @@
|
||||||
galaxy_info:
|
|
||||||
author: Evolix
|
|
||||||
description: Installation of NewRelic repository for APT sources.
|
|
||||||
|
|
||||||
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
|
|
||||||
|
|
||||||
license: GPLv2
|
|
||||||
|
|
||||||
min_ansible_version: 2.2
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: Debian
|
|
||||||
versions:
|
|
||||||
- jessie
|
|
||||||
|
|
||||||
dependencies: []
|
|
||||||
# List your role dependencies here, one per line.
|
|
||||||
# Be sure to remove the '[]' above if you add dependencies
|
|
||||||
# to this list.
|
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: test-kitchen
|
|
||||||
roles:
|
|
||||||
- role: newrelic-sources
|
|
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
driver:
|
|
||||||
name: docker
|
|
||||||
privileged: true
|
|
||||||
use_sudo: false
|
|
||||||
|
|
||||||
provisioner:
|
|
||||||
name: ansible_playbook
|
|
||||||
hosts: test-kitchen
|
|
||||||
roles_path: ../
|
|
||||||
ansible_verbose: true
|
|
||||||
require_ansible_source: false
|
|
||||||
require_chef_for_busser: false
|
|
||||||
idempotency_test: true
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: debian
|
|
||||||
driver_config:
|
|
||||||
image: evolix/ansible:2.2.1
|
|
||||||
|
|
||||||
suites:
|
|
||||||
- name: default
|
|
||||||
provisioner:
|
|
||||||
name: ansible_playbook
|
|
||||||
playbook: ./tests/test.yml
|
|
||||||
|
|
||||||
transport:
|
|
||||||
max_ssh_sessions: 6
|
|
|
@ -1,13 +0,0 @@
|
||||||
# newrelic-sysmond
|
|
||||||
|
|
||||||
Installation of NewRelic sysmond.
|
|
||||||
|
|
||||||
## Tasks
|
|
||||||
|
|
||||||
Everything is in the `tasks/main.yml` file.
|
|
||||||
|
|
||||||
if a license key is provided, the daemon is configured.
|
|
||||||
|
|
||||||
## Variables
|
|
||||||
|
|
||||||
* `newrelic_license`: license key (default: empty).
|
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
newrelic_license: ""
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: restart newrelic-sysmond
|
|
||||||
systemd:
|
|
||||||
name: newrelic-sysmond
|
|
||||||
state: restarted
|
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: test-kitchen
|
|
||||||
roles:
|
|
||||||
- role: newrelic-sysmond
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# newrelic-sources
|
||||||
|
|
||||||
|
Installation of NewRelic tools.
|
||||||
|
|
||||||
|
## Tasks
|
||||||
|
|
||||||
|
Everything is in the `tasks/main.yml` file.
|
||||||
|
|
||||||
|
NB : the repository key is store in the role and not fetched online, for performance reasons.
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
|
||||||
|
* `newrelic_license`: license key (default: empty).
|
||||||
|
* `newrelic_appname`: application name (default: empty).
|
||||||
|
|
||||||
|
* `newrelic_php` : install the php module (default: `False`)
|
||||||
|
* `newrelic_sysmond` : install the sysmond agent (default: `True`)
|
|
@ -1,3 +1,7 @@
|
||||||
---
|
---
|
||||||
|
newrelic_sysmond: True
|
||||||
|
|
||||||
|
newrelic_php: False
|
||||||
|
|
||||||
newrelic_license: ""
|
newrelic_license: ""
|
||||||
newrelic_appname: ""
|
newrelic_appname: ""
|
|
@ -13,3 +13,8 @@
|
||||||
- name: apt update
|
- name: apt update
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: restart newrelic-sysmond
|
||||||
|
systemd:
|
||||||
|
name: newrelic-sysmond
|
||||||
|
state: restarted
|
|
@ -1,6 +1,6 @@
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Evolix
|
author: Evolix
|
||||||
description: Installation of NewRelic sysmond.
|
description: Installation of NewRelic tools.
|
||||||
|
|
||||||
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
|
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- include: sources.yml
|
||||||
|
|
||||||
|
- include: php.yml
|
||||||
|
when: newrelic_php
|
||||||
|
|
||||||
|
- include: sysmond.yml
|
||||||
|
when: newrelic_sysmond
|
|
@ -1,6 +1,4 @@
|
||||||
---
|
---
|
||||||
- include_role:
|
|
||||||
name: newrelic-sources
|
|
||||||
|
|
||||||
- name: Pre-seed package configuration with app name
|
- name: Pre-seed package configuration with app name
|
||||||
debconf:
|
debconf:
|
||||||
|
@ -41,3 +39,4 @@
|
||||||
- name: Install package for PHP
|
- name: Install package for PHP
|
||||||
apt:
|
apt:
|
||||||
name: newrelic-php5
|
name: newrelic-php5
|
||||||
|
state: installed
|
|
@ -1,16 +1,10 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Add dotdeb GPG key
|
- name: Add dotdeb GPG key
|
||||||
apt_key:
|
apt_key:
|
||||||
# url: https://download.newrelic.com/548C16BF.gpg
|
# url: https://download.newrelic.com/548C16BF.gpg
|
||||||
data: "{{ lookup('file', '548C16BF.gpg') }}"
|
data: "{{ lookup('file', '548C16BF.gpg') }}"
|
||||||
|
|
||||||
- name: Find squid config whitelist
|
|
||||||
shell: find /etc/squid/whitelist-custom.conf /etc/squid3/whitelist-custom.conf /etc/squid/whitelist.conf /etc/squid3/whitelist.conf 2> /dev/null
|
|
||||||
failed_when: false
|
|
||||||
changed_when: false
|
|
||||||
check_mode: no
|
|
||||||
register: squid_whitelist_files
|
|
||||||
|
|
||||||
- name: set squid_service_name=squid3 for Debian < 9
|
- name: set squid_service_name=squid3 for Debian < 9
|
||||||
set_fact:
|
set_fact:
|
||||||
squid_service_name: squid3
|
squid_service_name: squid3
|
||||||
|
@ -18,6 +12,13 @@
|
||||||
- ansible_distribution == "Debian"
|
- ansible_distribution == "Debian"
|
||||||
- ansible_distribution_major_version | version_compare('9', '<')
|
- ansible_distribution_major_version | version_compare('9', '<')
|
||||||
|
|
||||||
|
- name: Find squid config whitelist
|
||||||
|
shell: find /etc/{{ squid_service_name | default('squid') }}/whitelist-custom.conf /etc/{{ squid_service_name | default('squid') }}/whitelist.conf 2> /dev/null
|
||||||
|
failed_when: false
|
||||||
|
changed_when: false
|
||||||
|
check_mode: no
|
||||||
|
register: squid_whitelist_files
|
||||||
|
|
||||||
- name: Append packages.dotdeb.org to Squid whitelist
|
- name: Append packages.dotdeb.org to Squid whitelist
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "{{ squid_whitelist_files.stdout_lines | first }}"
|
dest: "{{ squid_whitelist_files.stdout_lines | first }}"
|
||||||
|
@ -33,5 +34,4 @@
|
||||||
repo: "deb http://apt.newrelic.com/debian/ newrelic non-free"
|
repo: "deb http://apt.newrelic.com/debian/ newrelic non-free"
|
||||||
state: present
|
state: present
|
||||||
filename: newrelic
|
filename: newrelic
|
||||||
|
update_cache: yes
|
||||||
- meta: flush_handlers
|
|
|
@ -1,6 +1,4 @@
|
||||||
---
|
---
|
||||||
- include_role:
|
|
||||||
name: newrelic-sources
|
|
||||||
|
|
||||||
- name: Install system monitor daemon
|
- name: Install system monitor daemon
|
||||||
apt:
|
apt:
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
- hosts: test-kitchen
|
- hosts: test-kitchen
|
||||||
roles:
|
roles:
|
||||||
- role: newrelic-php
|
- role: newrelic
|
Loading…
Reference in New Issue