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???
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 { + +
include apt::repo::mariadb
make sure the proper 5.1 packages are installed
package { "mariadb-server":
require => Class["apt::repo::mariadb"], }
make sure the mysql user and group exist
group { "mysql": ensure => "present",
data directory at /mysql/data, so
make sure that those directories exist
file { [$mysqldatadir, "/var/log/mysql", "/var/run/mysqld"]: ensure => "directory", owner => "mysql", group => "mysql" @@ -49,10 +53,10 @@ class mariadb::server inherits mariadb::client {
user { "mysql": ensure => "present",
ensure => "stopped",
hasrestart => true, hasstatus => true, require => [ File["/etc/mysql/my.cnf"],