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

31 lines
842 B
YAML
Raw Normal View History

---
- name: Install dependencies
apt: name={{ item }} state=present
with_items:
- mysql-server
- php5-fpm
- php5-gd
- php5-mysql
- 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: Create vhost directory
file: path=/var/www/racktables state=directory owner=www-data group=www-data
- 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