Skip to content

Commit

Permalink
Merge pull request #3 from boxrick/master
Browse files Browse the repository at this point in the history
Fixing broken PHP and adding commercial option
  • Loading branch information
mrlesmithjr authored Apr 25, 2018
2 parents 5b505cb + b1cd99f commit ac36cf2
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ observium_monitor_libvirt_vms: false #Define if desired to monitor LibVirt VM's
pri_domain_name: 'vagrant.local'
observium_snmp_community_list: # define a list of default communities to try when adding devices
- '"public"' # requires that the quotes are inside single quotation marks to keep the quotes in the config.php
# If we wish to use the paid for version this will allow us to use
observium_commercial: false # Do we wish to use opensource version
observium_commercial_svn_user: "" # SVN user for commercial version
observium_commercial_svn_password: "" # SVN password for commercial version
observium_commercial_svn_repo: "http://svn.observium.org/svn/observium/branches/stable" # Repo to pull commercial version from
````

Dependencies
Expand Down
22 changes: 14 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,32 @@ observium_debian_pre_reqs:
- graphviz
- imagemagick
- ipmitool
- libapache2-mod-php5
- libapache2-mod-php
- mtr-tiny
- mysql-client
- php-pear
- php5-cli
- php5-gd
- php5-json
- php5-mcrypt
- php5-mysql
- php7.0-cli
- php7.0-gd
- php7.0-json
- php7.0-mcrypt
- php7.0-mysql
- python-mysqldb
- rrdtool
- snmp
- subversion
- whois
- php5-xcache # http://www.observium.org/docs/tuning/
# - mysql-server
- snmp-mibs-downloader

observium_dl_dir: '/opt'
observium_dl_package: 'observium-community-latest.tar.gz'
observium_dl_url: 'http://www.observium.org'
observium_monitor_libvirt_vms: false #Define if desired to monitor LibVirt VM's
pri_domain_name: 'vagrant.local'
observium_snmp_community_list: # define a list of default communities to try when adding devices
- '"public"' # requires that the quotes are inside single quotation marks to keep the quotes in the config.php

# If we wish to use the paid for version this will allow us to use
observium_commercial: false # Do we wish to use opensource version
observium_commercial_svn_user: "" # SVN user for commercial version
observium_commercial_svn_password: "" # SVN password for commercial version
observium_commercial_svn_repo: "http://svn.observium.org/svn/observium/branches/stable" # Repo to pull commercial version from
20 changes: 20 additions & 0 deletions tasks/install-commercial.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# This allows us to install the commercial version of observium

- name: Force fail when svn user not defined
fail:
msg: "observium_commercial_svn_user variable is undefined, this means we cannot clone from observium SVN"
when: not observium_commercial_svn_user | length > 0

- name: Force fail when svn password not defined
fail:
msg: "observium_commercial_svn_password variable is undefined, this means we cannot clone from observium SVN"
when: not observium_commercial_svn_password | length > 0

- name: install-commercial | Downloading Observium to {{ observium_dl_dir }}
subversion:
repo: "{{ observium_commercial_svn_repo }}"
dest: "{{ observium_base_dir }}"
username: "{{ observium_commercial_svn_user }}"
password: "{{ observium_commercial_svn_password }}"
update: no
4 changes: 4 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
when: ansible_os_family == "Debian"

- include: install.yml
when: not observium_commercial

- include: install-commercial.yml
when: observium_commercial

- include: config.yml

Expand Down

0 comments on commit ac36cf2

Please sign in to comment.