1
0
forked from infra/ansible
infra/roles/racktables/tasks/main.yml

39 lines
1.1 KiB
YAML
Raw Normal View History

---
- name: Install dependencies
2017-07-02 22:17:32 +02:00
apt: name={{ item }}
with_items:
- mysql-server
- php5-fpm
- php5-gd
2016-06-18 14:44:59 +02:00
- php5-ldap
- php5-mysql
2016-06-18 14:44:59 +02:00
- 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
2016-06-18 14:44:59 +02:00
- 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