Skip to content
Snippets Groups Projects
Commit 34515c7b authored by Alex Hayes's avatar Alex Hayes
Browse files

Add state 'mysql.dev' that provides support for installing MySQL development...

Add state 'mysql.dev' that provides support for installing MySQL development libraries and header files.
parent 991fe7cc
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,15 @@ Remove the database called ``test``, normally created as part of a default ...@@ -82,6 +82,15 @@ Remove the database called ``test``, normally created as part of a default
MySQL installation. This state is **not** included as part of the meta-state MySQL installation. This state is **not** included as part of the meta-state
above as this name may conflict with a real database. above as this name may conflict with a real database.
``mysql.dev``
------------------------------
Install the MySQL development libraries and header files.
.. note::
Note that this state is not installed by the mysql meta-state unless you set
your pillar data accordingly.
Updating the supported parameters Updating the supported parameters
================================= =================================
......
...@@ -6,6 +6,7 @@ Ubuntu: ...@@ -6,6 +6,7 @@ Ubuntu:
service: mysql service: mysql
python: python-mysqldb python: python-mysqldb
debconf_utils: debconf-utils debconf_utils: debconf-utils
dev: libmysqlclient-dev
config: config:
file: /etc/mysql/my.cnf file: /etc/mysql/my.cnf
sections: sections:
...@@ -50,6 +51,7 @@ Debian: ...@@ -50,6 +51,7 @@ Debian:
service: mysql service: mysql
python: python-mysqldb python: python-mysqldb
debconf_utils: debconf-utils debconf_utils: debconf-utils
dev: libmysqlclient-dev
config: config:
file: /etc/mysql/my.cnf file: /etc/mysql/my.cnf
sections: sections:
...@@ -92,6 +94,7 @@ CentOS: ...@@ -92,6 +94,7 @@ CentOS:
client: mysql client: mysql
service: mysqld service: mysqld
python: MySQL-python python: MySQL-python
dev: mysql-devel
config: config:
file: /etc/my.cnf file: /etc/my.cnf
sections: sections:
...@@ -110,6 +113,7 @@ RedHat: ...@@ -110,6 +113,7 @@ RedHat:
client: mysql client: mysql
service: mysqld service: mysqld
python: MySQL-python python: MySQL-python
dev: mysql-devel
config: config:
file: /etc/my.cnf file: /etc/my.cnf
sections: sections:
...@@ -128,6 +132,7 @@ Amazon: ...@@ -128,6 +132,7 @@ Amazon:
client: mysql client: mysql
service: mysqld service: mysqld
python: MySQL-python python: MySQL-python
dev: mysql-devel
config: config:
file: /etc/my.cnf file: /etc/my.cnf
sections: sections:
...@@ -146,6 +151,7 @@ Gentoo: ...@@ -146,6 +151,7 @@ Gentoo:
client: dev-db/mysql client: dev-db/mysql
service: mysql service: mysql
python: dev-python/mysql-python python: dev-python/mysql-python
dev: dev-db/mysqlced
config: config:
file: /etc/mysql/my.cnf file: /etc/mysql/my.cnf
sections: sections:
...@@ -227,6 +233,7 @@ FreeBSD: ...@@ -227,6 +233,7 @@ FreeBSD:
client: mysql56-client client: mysql56-client
service: mysql-server service: mysql-server
python: pymysql python: pymysql
dev: mysql56-server
config: config:
file: /usr/local/etc/my.cnf file: /usr/local/etc/my.cnf
sections: sections:
......
{% from "mysql/defaults.yaml" import rawmap with context %}
{%- set mysql = salt['grains.filter_by'](rawmap, grain='os', merge=salt['pillar.get']('mysql:server:lookup')) %}
mysql_dev:
pkg:
- installed
- name: {{ mysql.dev }}
...@@ -7,10 +7,16 @@ ...@@ -7,10 +7,16 @@
{%- endfor -%} {%- endfor -%}
{% endmacro %} {% endmacro %}
{% set mysql_dev = salt['pillar.get']('mysql:dev:install', False) %}
include: include:
- mysql.server - mysql.server
- mysql.database - mysql.database
- mysql.user - mysql.user
{% if mysql_dev %}
- mysql.dev
{% endif %}
{% if (db_states|length() + user_states|length()) > 0 %} {% if (db_states|length() + user_states|length()) > 0 %}
extend: extend:
......
...@@ -60,3 +60,8 @@ mysql: ...@@ -60,3 +60,8 @@ mysql:
service: mysql-service service: mysql-service
config: /etc/mysql/my.cnf config: /etc/mysql/my.cnf
python: python-mysqldb python: python-mysqldb
# Install MySQL headers
dev:
# Install dev package - defaults to False
install: False
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment