Place librenms to /usr/share/librenms.

This commit is contained in:
Markus 2016-07-07 07:03:53 +02:00
parent ed66d777fe
commit a8fdb58d9f
3 changed files with 9 additions and 12 deletions

View File

@ -33,23 +33,20 @@
- name: Configure MySQL user
mysql_user: name={{ librenms_dbuser }} password={{ librenms_dbpass }} priv={{ librenms_dbname }}.*:ALL state=present
- name: Ensure librenms user exists
user: name=librenms createhome=no groups=www-data home=/opt/librenms system=yes
user: name=librenms groups=www-data createhome=no home=/usr/share/librenms system=yes
- name: Clone librenms
git: repo=https://github.com/librenms/librenms.git dest=/opt/librenms depth=1 update=no
become: yes
become_user: librenms
git: repo=https://github.com/librenms/librenms.git dest=/usr/share/librenms depth=1 update=no
- name: Ensure rrd directory exists
file: path=/opt/librenms/rrd owner=librenms group=librenms mode=0775 state=directory
file: path=/var/lib/librenms/rrd owner=librenms group=librenms mode=0775 state=directory
- name: Ensure logs directory exists
file: path=/opt/librenms/logs owner=librenms group=librenms mode=0775 state=directory
- name: Ensure rrd link exists
file: src=/var/lib/librenms/rrd dest=/usr/share/librenms/rrd state=link
- name: Configure librenms
template: src=config.php.j2 dest=/opt/librenms/config.php owner=librenms group=librenms mode=0440
template: src=config.php.j2 dest=/usr/share/librenms/config.php owner=librenms group=www-data mode=0440
- name: Configure vhost
template: src=vhost.j2 dest=/etc/nginx/sites-available/librenms

View File

@ -6,7 +6,7 @@ $config['db_host'] = 'localhost';
$config['db_user'] = '{{ librenms_dbuser }}';
$config['db_pass'] = '{{ librenms_dbpass }}';
$config['db_name'] = '{{ librenms_dbname }}';
$config['db']['extension'] = "mysqli";// mysql or mysqli
$config['db']['extension'] = "mysql";// mysql or mysqli
// This is the user LibreNMS will run as
//Please ensure this user is created and has the correct permissions to your install
@ -18,7 +18,7 @@ $config['memcached']['host'] = "localhost";
$config['memcached']['port'] = 11211;
### Locations - it is recommended to keep the default
$config['install_dir'] = "/opt/librenms";
$config['install_dir'] = "/usr/share/librenms";
### This should *only* be set if you want to *force* a particular hostname/port
### It will prevent the web interface being usable form any other hostname

View File

@ -4,7 +4,7 @@ server {
server_name {{ librenms_domain }};
root /opt/librenms/html;
root /usr/share/librenms/html;
index index.php;