On Feb 25, 3:34 pm, Tim Dunphy <[email protected]> wrote:
> class mysql {
>
> $mysqlapps = ["mysql-server","mysql","php-mysql"]
> package { $mysqlapps: ensure => installed }
> user { "mysql":
> uid => 27,
> ensure => present
> }
> group { "mysql":
> gid => 27,
> ensure => present
> }
> $mreqs = ['User["mysql"]','Group["mysql"]','Package["mysql-server"]']
> service { mysqld:
> name => mysqld,
> enable => true,
> hasstatus => true,
> ensure => running,
> require => $mreqs,
> loglevel => debug
> }
>
> }
[...]
> [root@pclient3 ~]# puppetd --test
> info: Caching catalog for pclient3.acadaca.net
> err: Could not run Puppet configuration client: Could not find
> dependency User["mysql"] for Service[mysqld] at
> /etc/puppet/manifests/classes/dbservices.pp:57
>
> For some reason the mysql user isn't being created. I really feel as
> if I am close to a solution to this problem and I really appreciate
> any further input you may have!
It looks like Puppet thinks the quotes are part of the name of the
user, in which case this may work better than your original:
$mreqs = ['User[mysql]','Group[mysql]','Package[mysql-server]']
Something has gotten lost here, however: why are you sticking those in
a variable in the first place? Do you have other resources, not shown
in your manifest above, that also depend *directly* on that exact
collection of resources? Otherwise, using a variable just complicates
your life when you could instead write this:
service { "mysqld":
enable => true,
hasstatus => true,
ensure => running,
require => [ User["mysql"], Group["mysql"],
Package["mysql-server"] ],
loglevel => debug
}
Cheers,
John
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.