I am having the following issue:
Invalid resource type msql::db at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/db.pp:6
My manifest (db.pp) is:
include mysql::server
msql::db { "loja":
schema => "loja_schema",
password => "lojasecret",
}
My defined type called mysql::db is in a module called mysql. This module has a manifest folder with init.pp:
class mysql { }
And a file called db.pp where the defined type is:
define mysql::db($schema, $user = $title, $password) {
#Dependência
Class['mysql::server'] -> Mysql::db[$title]
exec { "$title-schema":
unless => "mysql -uroot $schema",
command => "mysqladmin -uroot create $schema",
path => "/usr/bin/",
}
exec {"$title-user":
unless => "mysql -u$user -p$password $schema",
command => "mysql -uroot -e \"GRANT ALL PRIVILEGES ON \
$schema.* TO '$user'@'%' \
IDENTIFIED BY '$password';\"",
path => "/usr/bin/",
require => Exec["$title-schema"],
}
}
What it seems to be problem? Thanks.