39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
---
|
|
|
|
- name: Install dependencies
|
|
apt: name={{ item }}
|
|
with_items:
|
|
- mysql-server
|
|
- php5-fpm
|
|
- php5-gd
|
|
- php5-ldap
|
|
- php5-mysql
|
|
- php5-snmp
|
|
- python-mysqldb
|
|
|
|
- name: Configure MySQL database
|
|
mysql_db: name={{ racktables_dbname }}
|
|
|
|
- name: Configure MySQL user
|
|
mysql_user: name={{ racktables_dbuser }} password={{ racktables_dbpass }} priv={{ racktables_dbname }}.*:ALL state=present
|
|
|
|
- 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
|
|
template: src=vhost.j2 dest=/etc/nginx/sites-available/racktables
|
|
notify: Restart nginx
|
|
|
|
- name: Enable vhost
|
|
file: src=/etc/nginx/sites-available/racktables dest=/etc/nginx/sites-enabled/racktables state=link
|
|
notify: Restart nginx
|
|
|
|
- name: Start php5-fpm
|
|
service: name=php5-fpm state=started enabled=yes
|