Create and manage MySQL databases on the server

This commit is contained in:
Clayton Kramer 2014-05-12 11:47:51 -04:00
parent 101f7ffb59
commit 88f80b06a6
3 changed files with 15 additions and 0 deletions

View file

@ -26,3 +26,8 @@ Install the MySQL client package.
Install the MySQL server package and start the service. Install the MySQL server package and start the service.
Debian OS family supports setting MySQL root password during install via debconf. Debian OS family supports setting MySQL root password during install via debconf.
``mysql.database``
----------------
Create and manage MySQL databases.

View file

@ -26,6 +26,11 @@ mysqld:
- watch: - watch:
- pkg: mysqld - pkg: mysqld
mysql-python:
pkg:
- installed
- name: {{ mysql.python }}
{% if grains['os'] in ['Ubuntu', 'Debian', 'Gentoo'] %} {% if grains['os'] in ['Ubuntu', 'Debian', 'Gentoo'] %}
my.cnf: my.cnf:
file.managed: file.managed:

View file

@ -5,6 +5,11 @@ mysql:
port: 3306 port: 3306
user: mysql user: mysql
# Manage databases
database:
- foo
- baz
# Override any names defined in map.jinja # Override any names defined in map.jinja
lookup: lookup:
server: mysql-server server: mysql-server