> Then let's take a step back. Your class is rather complicated, and
> all the details may be confusing (or even causing) the issue. For
> example, you may have a nesting problem that is difficult to see in
> all that code. I suggest putting each 'define' in its own file to
> help make things clearer and more maintainable. Even before that,
> however, I suggest getting a much simplified stub working, then
> fleshing it out. So, does this work for you:
>
> drupal6/manifests/init.pp
> -----------------------------------
> class drupal6 {
> drupal6::theme_repo { "foo": }
>
> }
>
> drupal6/manifests/theme_repo.pp
> ------------------------------------------------
> define theme-repo() {
>
> }
>
> ?
Ok, I took a big, big step back, broke out all of the drupal6::site,
drupal6::theme-repo and drupal6::module into their own files. I also
reduced the complexity of the module by stubbing out all the
definitions to contain almost nothing. Here is what I have left:
drupal6/manifests/init.pp
-------------------------------------
$d6_confpath = "/usr/share/drupal6"
$d6_scriptpath = "/usr/share/drupal6"
$gitdir = "/srv/git/drupal-themes"
class drupal6 {
}
drupal6/manifests/module.pp
-------------------------------------
define drupal6::module ( $ensure = 'present', $site = 'all') {
notice("module")
}
drupal6/manifests/site.pp
-------------------------------------
define drupal6::site (
$ensure = 'present',
$dbname,
$dbpw,
$dbserver,
$sitefqdn,
$siteAlias = "",
$modules = "",
$nagios_uid,
$nagios_timeout = 5,
$theme = { "name" => nil, "version" => nil, "upstream" =>
"drupal" }
) {
case $ensure {
'present': {
drupal6::module { "module":
}
# Site theme
drupal6::theme-repo { "$name-$theme['name']":
}
} # 'present'
} # case $ensure
}
drupal6/manifests/theme-repo.pp
-------------------------------------
define drupal6::theme-repo()
{
notice("theme-repo")
}
And I still get the same error below.
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Invalid resource type drupal6::theme-repo at srv/puppet/modules/
drupal6/manifests/site.pp:19 on node www-cms-dev.fs.uwaterloo.ca
That is until I removed $theme['name'] from the drupal6::theme-repo's
name! It looks like having set theme['name'] = nil as the default
value and not setting it to a non-nil value caused the error.
--
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.