Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RHEL based OSs #12

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 107 additions & 74 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,80 +19,113 @@ galaxy_info:
# platform on this list, let us know and we'll get it added!
#
platforms:
# - name: EL
# versions:
# - all
# - 5
# - 6
# - name: GenericUNIX
# versions:
# - all
# - any
# - name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
# - name: opensuse
# versions:
# - all
# - 12.1
# - 12.2
# - 12.3
# - 13.1
# - 13.2
# - name: GenericBSD
# versions:
# - all
# - any
# - name: FreeBSD
# versions:
# - all
# - 8.0
# - 8.1
# - 8.2
# - 8.3
# - 8.4
# - 9.0
# - 9.1
# - 9.1
# - 9.2
- name: Ubuntu
versions:
# - all
# - lucid
# - maverick
# - natty
# - oneiric
- precise
# - quantal
# - raring
# - saucy
- trusty
# - name: SLES
# versions:
# - all
# - 10SP3
# - 10SP4
# - 11
# - 11SP1
# - 11SP2
# - 11SP3
# - name: GenericLinux
# versions:
# - all
# - any
# - name: Debian
# versions:
# - all
# - etch
# - lenny
# - squeeze
# - wheezy
#
# - name: EL
# versions:
# - all
# - 5
# - 6
# - 7
#- name: GenericUNIX
# versions:
# - all
# - any
#- name: Solaris
# versions:
# - all
# - 10
# - 11.0
# - 11.1
# - 11.2
# - 11.3
#- name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
# - 21
# - 22
# - 23
#- name: Windows
# versions:
# - all
# - 2012R2
#- name: SmartOS
# versions:
# - all
# - any
#- name: opensuse
# versions:
# - all
# - 12.1
# - 12.2
# - 12.3
# - 13.1
# - 13.2
- name: Amazon
versions:
- all
# - 2013.03
# - 2013.09
#- name: GenericBSD
# versions:
# - all
# - any
#- name: FreeBSD
# versions:
# - all
# - 10.0
# - 10.1
# - 10.2
# - 8.0
# - 8.1
# - 8.2
# - 8.3
# - 8.4
# - 9.0
# - 9.1
# - 9.1
# - 9.2
# - 9.3
- name: Ubuntu
versions:
- all
# - lucid
# - maverick
# - natty
# - oneiric
# - precise
# - quantal
# - raring
# - saucy
# - trusty
# - utopic
# - vivid
# - wily
#- name: SLES
# versions:
# - all
# - 10SP3
# - 10SP4
# - 11
# - 11SP1
# - 11SP2
# - 11SP3
#- name: GenericLinux
# versions:
# - all
# - any
- name: Debian
versions:
- all
# - etch
# - jessie
# - lenny
# - squeeze
# - wheezy categories:

# List tags for your role here, one per line. A tag is
# a keyword that describes and categorizes the role.
# Users find roles by searching for tags. Be sure to
Expand Down
22 changes: 22 additions & 0 deletions tasks/Debian-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---

- name: Installing dependencies
apt:
pkg: apt-transport-https
state: present

- name: Adding APT key
apt_key:
url: https://download.newrelic.com/548C16BF.gpg

- name: Add APT repository
apt_repository:
repo: "deb http://apt.newrelic.com/debian/ newrelic non-free"
update_cache: yes

- name: Installing packages
apt:
pkg: "{{ item }}"
state: present
with_items:
- newrelic-php5
11 changes: 11 additions & 0 deletions tasks/RedHat-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Add repository
yum:
name: http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
state: present

- name: install newrelic agent
yum:
name: newrelic-php5
state: latest
1 change: 1 addition & 0 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
owner: "root"
group: "root"
mode: "0644"
notify: restart php-fpm
23 changes: 4 additions & 19 deletions tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
---

- name: Installing dependencies
apt:
pkg: apt-transport-https
state: present
- import_tasks: 'RedHat-install.yml'
when: ansible_os_family == 'RedHat'

- name: Adding APT key
apt_key:
url: https://download.newrelic.com/548C16BF.gpg

- name: Add APT repository
apt_repository:
repo: "deb http://apt.newrelic.com/debian/ newrelic non-free"
update_cache: yes

- name: Installing packages
apt:
pkg: "{{ item }}"
state: present
with_items:
- newrelic-php5
- import_tasks: 'Debian-install.yml'
when: ansible_os_family == 'Debian'
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
tags:
- monitoring
- php5-newrelic
- config
- php5-newrelic-config
- install
- php5-newrelic-install