2014-11-18 08:24:39 -05:00
|
|
|
---
|
|
|
|
- hosts: all
|
|
|
|
sudo: yes
|
2014-11-19 16:27:37 -05:00
|
|
|
vars:
|
|
|
|
databases:
|
|
|
|
rookeries:
|
|
|
|
username: rookeries
|
|
|
|
password: system_admin
|
2014-11-18 08:24:39 -05:00
|
|
|
tasks:
|
|
|
|
|
2014-11-19 16:27:37 -05:00
|
|
|
- name: Setup MySQL 5 server + Python dependencies
|
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- mysql-server
|
|
|
|
- python-mysqldb
|
2014-11-18 08:24:39 -05:00
|
|
|
|
2014-11-19 16:27:37 -05:00
|
|
|
- name: Setup MySQL databases for rookeries.
|
|
|
|
mysql_db: name={{ item.key }} state=present
|
|
|
|
with_dict: databases
|
2014-11-18 08:24:39 -05:00
|
|
|
|
2014-11-19 16:27:37 -05:00
|
|
|
- name: Setup MySQL database users for rookeries.
|
|
|
|
mysql_user: name={{ item.value.username }} password={{ item.value.password }} priv={{ item.key }}:ALL
|
|
|
|
with_dict: databases
|