Complete RackTables installation.

This commit is contained in:
Markus 2016-06-18 14:44:59 +02:00
parent 5bb3a44c71
commit 54caed7299
3 changed files with 67 additions and 1 deletions

View File

@ -6,7 +6,9 @@
- mysql-server - mysql-server
- php5-fpm - php5-fpm
- php5-gd - php5-gd
- php5-ldap
- php5-mysql - php5-mysql
- php5-snmp
- python-mysqldb - python-mysqldb
- name: Configure MySQL database - name: Configure MySQL database
@ -18,6 +20,15 @@
- name: Create vhost directory - name: Create vhost directory
file: path=/var/www/racktables state=directory owner=www-data group=www-data file: path=/var/www/racktables state=directory owner=www-data group=www-data
- name: Unpack RackTables
unarchive: src=http://heanet.dl.sourceforge.net/project/racktables/RackTables-0.20.11.tar.gz dest=/opt copy=no
- name: Create link
file: src=/opt/RackTables-0.20.11 dest=/opt/racktables state=link
- name: Configure RackTables
template: src=secret.php.j2 dest=/opt/RackTables-0.20.11/wwwroot/inc/secret.php owner=www-data group=www-data mode=0400
- name: Configure vhost - name: Configure vhost
template: src=vhost.j2 dest=/etc/nginx/sites-available/racktables template: src=vhost.j2 dest=/etc/nginx/sites-available/racktables
notify: Restart nginx notify: Restart nginx

View File

@ -0,0 +1,55 @@
<?php
$pdo_dsn = 'mysql:host=localhost;dbname={{ racktables_dbname }}';
$db_username = '{{ racktables_dbuser }}';
$db_password = '{{ racktables_dbpass }}';
# Setting MySQL client buffer size may be required to make downloading work for
# larger files, but it does not work with mysqlnd.
# $pdo_bufsize = 50 * 1024 * 1024;
# Setting PDO SSL key, cert, and CA will allow a SSL/TLS connection to the MySQL
# DB. Make sure the files are readable by the web server
# $pdo_ssl_key = '/path/to/ssl/key'
# $pdo_ssl_cert = '/path/to/ssl/cert'
# $pdo_ssl_ca = '/path/to/ssl/ca'
$user_auth_src = 'database';
$require_local_account = TRUE;
# Default setting is to authenticate users locally, but it is possible to
# employ existing LDAP or Apache user accounts. Check RackTables wiki for
# more information, in particular, this page for LDAP configuration details:
# http://wiki.racktables.org/index.php?title=LDAP
#$LDAP_options = array
#(
# 'server' => 'localhost',
# 'domain' => 'example.com',
# 'search_attr' => '',
# 'search_dn' => '',
# // The following credentials will be used when searching for the user's DN:
# 'search_bind_rdn' => NULL,
# 'search_bind_password' => NULL,
# 'displayname_attrs' => '',
# 'options' => array (LDAP_OPT_PROTOCOL_VERSION => 3),
# 'use_tls' => 2, // 0 == don't attempt, 1 == attempt, 2 == require
#);
# For SAML configuration details:
# http://wiki.racktables.org/index.php?title=SAML
#$SAML_options = array
#(
# 'simplesamlphp_basedir' => '../simplesaml',
# 'sp_profile' => 'default-sp',
# 'usernameAttribute' => 'eduPersonPrincipName',
# 'fullnameAttribute' => 'fullName',
# 'groupListAttribute' => 'memberOf',
#);
# This HTML banner is intended to assist users in dispatching their issues
# to the local tech support service. Its text (in its verbatim form) will
# be appended to assorted error messages visible in user's browser (including
# "not authenticated" message). Beware of placing any sensitive information
# here, it will be readable by unauthorized visitors.
#$helpdesk_banner = '<B>This RackTables instance is supported by Example Inc. IT helpdesk, dial ext. 1234 to report a problem.</B>';
?>

View File

@ -4,7 +4,7 @@ server {
server_name {{ racktables_domain }}; server_name {{ racktables_domain }};
root /var/www/racktables; root /opt/racktables/wwwroot;
index index.php; index index.php;