From 88f80b06a64f37ab10cf3d0154c919745ce9491e Mon Sep 17 00:00:00 2001 From: Clayton Kramer Date: Mon, 12 May 2014 11:47:51 -0400 Subject: [PATCH] Create and manage MySQL databases on the server --- README.rst | 5 +++++ mysql/server.sls | 5 +++++ pillar.example | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/README.rst b/README.rst index d3a1166..e9efc69 100644 --- a/README.rst +++ b/README.rst @@ -26,3 +26,8 @@ Install the MySQL client package. Install the MySQL server package and start the service. Debian OS family supports setting MySQL root password during install via debconf. + +``mysql.database`` +---------------- + +Create and manage MySQL databases. \ No newline at end of file diff --git a/mysql/server.sls b/mysql/server.sls index 6586404..84d3b83 100644 --- a/mysql/server.sls +++ b/mysql/server.sls @@ -26,6 +26,11 @@ mysqld: - watch: - pkg: mysqld +mysql-python: + pkg: + - installed + - name: {{ mysql.python }} + {% if grains['os'] in ['Ubuntu', 'Debian', 'Gentoo'] %} my.cnf: file.managed: diff --git a/pillar.example b/pillar.example index c031cf6..a2fb7f6 100644 --- a/pillar.example +++ b/pillar.example @@ -5,6 +5,11 @@ mysql: port: 3306 user: mysql + # Manage databases + database: + - foo + - baz + # Override any names defined in map.jinja lookup: server: mysql-server