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-12-03 22:09:38 -05:00
|
|
|
- name: setup MySQL server + Python dependencies
|
2014-11-19 16:27:37 -05:00
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- mysql-server
|
|
|
|
- python-mysqldb
|
2014-11-18 08:24:39 -05:00
|
|
|
|
2014-12-03 22:09:38 -05:00
|
|
|
- name: setup MySQL databases for rookeries.
|
2014-11-19 16:27:37 -05:00
|
|
|
mysql_db: name={{ item.key }} state=present
|
|
|
|
with_dict: databases
|
2014-11-18 08:24:39 -05:00
|
|
|
|
2014-12-03 22:09:38 -05:00
|
|
|
- name: add MySQL database users for rookeries.
|
2014-11-19 16:27:37 -05:00
|
|
|
mysql_user: name={{ item.value.username }} password={{ item.value.password }} priv={{ item.key }}:ALL
|
|
|
|
with_dict: databases
|