diff --git a/manifests/bindings.pp b/manifests/bindings.pp index a9b732e..d06b542 100644 --- a/manifests/bindings.pp +++ b/manifests/bindings.pp @@ -1,58 +1,32 @@ -# Class: mysql::bindings -# -# This class installs various bindings for mysql. -# -# Parameters: -# -# [*java_enable*] - Boolean to determine if we should include the java bindings. -# -# [*perl_enable*] - Boolean to determine if we should include the perl bindings. -# -# [*python_enable*] - Boolean to determine if we should include the python bindings. -# -# [*ruby_enable*] - Boolean to determine if we should include the ruby bindings. -# -# [*java_package_name*] - The name of the java package containing the java connector -# -# [*java_package_ensure*] - State of the java binding packages. -# -# [*perl_package_ensure*] - State of the perl binding packages. -# -# [*perl_package_name*] - The name of the perl mysql package to install -# -# [*perl_package_provider*] - The provider to use when installing the perl package. -# -# [*python_package_ensure*] - State of the python binding packages. -# -# [*python_package_name*] - The name of the python mysql package to install -# -# [*ruby_ensure*] - State of the ruby binding packages. -# -# [*ruby_package_name*] - The name of the ruby mysql package to install -# -# [*ruby_package_provider*] - The provider to use when installing the ruby package. -# +# See README.md. class mysql::bindings ( # Boolean to determine if we should include the classes. $java_enable = false, $perl_enable = false, + $php_enable = false, $python_enable = false, $ruby_enable = false, # Settings for the various classes. - $java_package_ensure = $mysql::globals::java_package_ensure, - $java_package_name = $mysql::globals::java_package_name, - $perl_package_ensure = $mysql::globals::perl_package_ensure, - $perl_package_name = $mysql::globals::perl_package_name, - $perl_package_provider = $mysql::globals::perl_package_provider, - $python_package_ensure = $mysql::globals::python_package_ensure, - $python_package_name = $mysql::globals::python_package_name, - $ruby_package_ensure = $mysql::globals::ruby_package_ensure, - $ruby_package_name = $mysql::globals::ruby_package_name, - $ruby_package_provider = $mysql::globals::ruby_package_provider + $java_package_ensure = $mysql::params::java_package_ensure, + $java_package_name = $mysql::params::java_package_name, + $java_package_provider = $mysql::params::java_package_provider, + $perl_package_ensure = $mysql::params::perl_package_ensure, + $perl_package_name = $mysql::params::perl_package_name, + $perl_package_provider = $mysql::params::perl_package_provider, + $php_package_ensure = $mysql::params::php_package_ensure, + $php_package_name = $mysql::params::php_package_name, + $php_package_provider = $mysql::params::php_package_provider, + $python_package_ensure = $mysql::params::python_package_ensure, + $python_package_name = $mysql::params::python_package_name, + $python_package_provider = $mysql::params::python_package_provider, + $ruby_package_ensure = $mysql::params::ruby_package_ensure, + $ruby_package_name = $mysql::params::ruby_package_name, + $ruby_package_provider = $mysql::params::ruby_package_provider ) inherits mysql::globals { if $java_enable { include '::mysql::bindings::java' } if $perl_enable { include '::mysql::bindings::perl' } + if $php_enable { include '::mysql::bindings::php' } if $python_enable { include '::mysql::bindings::python' } if $ruby_enable { include '::mysql::bindings::ruby' } diff --git a/manifests/bindings/java.pp b/manifests/bindings/java.pp index 3ff6869..d080837 100644 --- a/manifests/bindings/java.pp +++ b/manifests/bindings/java.pp @@ -1,24 +1,10 @@ -# Class: mysql::bindings::java -# -# This class installs the mysql-java-connector. -# -# Parameters: -# [*package_name*] - The name of the mysql java package. -# [*package_ensure*] - Ensure state for package. Can be specified as version. -# Actions: -# -# Requires: -# -# Sample Usage: -# -class mysql::bindings::java ( - $package_ensure = $mysql::bindings::java_package_ensure, - $package_name = $mysql::bindings::java_package_name -) inherits mysql::globals { +# Private class +class mysql::bindings::java { package { 'mysql-connector-java': - ensure => $package_ensure, - name => $package_name, + ensure => $mysql::bindings::java_package_ensure, + name => $mysql::bindings::java_package_name, + provider => $mysql::bindings::java_package_provider, } } diff --git a/manifests/bindings/perl.pp b/manifests/bindings/perl.pp index 7c2cb02..58c76f4 100644 --- a/manifests/bindings/perl.pp +++ b/manifests/bindings/perl.pp @@ -1,28 +1,10 @@ -# Class: mysql::bindings::perl -# -# installs the perl bindings for mysql -# -# Parameters: -# [*package_ensure*] - Ensure state for package. Can be specified as version. -# [*package_name*] - name of package -# [*package_provider*] - The provider to use to install the package -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -class mysql::bindings::perl ( - $package_ensure = $mysql::bindings::perl_package_ensure, - $package_name = $mysql::bindings::perl_package_name, - $package_provider = $mysql::bindings::perl_package_provider -) inherits mysql::globals { +# Private class +class mysql::bindings::perl { package{ 'perl_mysql': - ensure => $package_ensure, - name => $package_name, - provider => $package_provider, + ensure => $mysql::bindings::perl_package_ensure, + name => $mysql::bindings::perl_package_name, + provider => $mysql::bindings::perl_package_provider, } } diff --git a/manifests/bindings/php.pp b/manifests/bindings/php.pp new file mode 100644 index 0000000..81d08d3 --- /dev/null +++ b/manifests/bindings/php.pp @@ -0,0 +1,10 @@ +# Private class: See README.md +class mysql::bindings::php { + + package { 'php-mysql': + ensure => $mysql::bindings::php_package_ensure, + name => $mysql::bindings::php_package_name, + provider => $mysql::bindings::php_package_provider, + } + +} diff --git a/manifests/bindings/python.pp b/manifests/bindings/python.pp index 8ba5036..96a3882 100644 --- a/manifests/bindings/python.pp +++ b/manifests/bindings/python.pp @@ -1,25 +1,10 @@ -# Class: mysql::bindings::python -# -# This class installs the python libs for mysql. -# -# Parameters: -# [*package_ensure*] - Ensure state for package. Can be specified as version. -# [*package_name*] - Name of package -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -class mysql::bindings::python( - $package_ensure = $mysql::bindings::python_package_ensure, - $package_name = $mysql::bindings::python_package_name -) inherits mysql::globals { +# Private class +class mysql::bindings::python { package { 'python-mysqldb': - ensure => $package_ensure, - name => $package_name, + ensure => $mysql::bindings::python_package_ensure, + name => $mysql::bindings::python_package_name, + provider => $mysql::bindings::python_package_provider, } } diff --git a/manifests/bindings/ruby.pp b/manifests/bindings/ruby.pp index 2e1f03b..f916f54 100644 --- a/manifests/bindings/ruby.pp +++ b/manifests/bindings/ruby.pp @@ -1,28 +1,10 @@ -# Class: mysql::bindings::ruby -# -# installs the ruby bindings for mysql -# -# Parameters: -# [*package_ensure*] - Ensure state for package. Can be specified as version. -# [*package_name*] - name of package -# [*package_provider*] - The provider to use to install the package -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -class mysql::bindings::ruby ( - $package_ensure = $mysql::bindings::ruby_package_ensure, - $package_name = $mysql::bindings::ruby_package_name, - $package_provider = $mysql::bindings::ruby_package_provider -) inherits mysql::globals { +# Private class +class mysql::bindings::ruby { package{ 'ruby_mysql': - ensure => $package_ensure, - name => $package_name, - provider => $package_provider, + ensure => $mysql::bindings::ruby_package_ensure, + name => $mysql::bindings::ruby_package_name, + provider => $mysql::bindings::ruby_package_provider, } } diff --git a/manifests/php.pp b/manifests/php.pp index 0317b38..783d793 100644 --- a/manifests/php.pp +++ b/manifests/php.pp @@ -1,19 +1,14 @@ -# Class: mysql::php -# -# This class installs the php libs for mysql. -# -# Parameters: -# [*package_ensure*] - Ensure state for package. Can be specified as version. -# [*package_name*] - The name of package -# class mysql::php( - $package_ensure = 'present', - $package_name = $mysql::php_package_name -) inherits mysql { + $package_ensure = $mysql::params::php_package_name, + $package_name = $mysql::params::php_package_name, +) inherits mysql::params { - package { 'php-mysql': - ensure => $package_ensure, - name => $package_name, + notify { "mysql::php has been renamed to mysql::bindings::php and this + backwards compatibility shim will be removed on 01/01/2014.": } + + class { 'mysql::bindings::php': + package_ensure => $package_ensure, + package_name => $package_name, } }