olindata / puppet-mariadb

A puppet module to manage mariadb
Apache License 2.0
2 stars 0 forks source link

rfc - parametersized classes + puppet 2.6 compat #2

Closed grooverdan closed 12 years ago

grooverdan commented 12 years ago

Puppet 2.6 doesn't seem to support hyphens in variable names.

This is an attempt at parameterized class. It has yet to propagate to the rest of the classes.

The error I haven't fixed is: err: /Stage[main]/Mariadb::Server/User[mysql]/uid: change from 105 to 111 failed: Could not set uid on user[mysql]: Execution of '/usr/sbin/usermod -u 111 mysql' returned 8: usermod: user mysql is currently logged in

cause1: the package installation starts the service. cause2: the group depends on the Package which creates the group.

potential solutions: remove group rules? something else???

diff --git a/manifests/server.pp b/manifests/server.pp index c414d7b..d802b0e 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -1,20 +1,24 @@ -class mariadb::server inherits mariadb::client { +class mariadb::server( $mysqlgid = 105, $mysqldatadir = '/var/lib/mysql' ) inherits mariadb::client { + +

walterheck commented 12 years ago

Implemented a params class that takes care of module-type variables much nicer, check mariadb::params