On Sep 16, 4:55 pm, Allan Marcus <al...@lanl.gov> wrote:

> warning: Configuration could not be instantiated: Could not find  
> dependent Pkgdmg_install[Office2008-1211UpdateEN.dmg] for  
> Package[Office2008-1220UpdateEN.dmg] at /var/puppet/environments/
> development/modules/lanl-baseline/manifests/definitions/pkg_install.pp:
> 31; using cached catalog
>
> pkgdmg_install is a definition that looks like this:
>
> {
>          $sourcedir_real = $sourcedir ? {
>                  false => "http://puppet.lanl.gov";,
>                  default => $sourcedir
>          }
>         $dirpath_real = $dirpath ? {
>                 false => "",
>                 default => $dirpath
>         }
>          package { $name:
>                  ensure => installed,
>                  provider => pkgdmg,
>                  source => "$sourcedir_real/${dirpath_real}${name}"
>          }
>
> }
>
> what simple little stupid thing am I missing?

I don't think puppet supports dependencies between defined type
invocations -- at least, not the way you seem to expect.  This makes
sense to me when I consider that although defined types look a lot
like classes, they are not singletons and they function essentially as
macros.  If you look closely at your error message, in fact, you will
see that the relationship that puppet cannot satisfy has a Package
resource at one end, even though you did not explicitly specify such a
relationship.  Puppet is doing its best for you, but what you're
asking cannot be satisfied in its model.

I think you can solve your problem by making the targets of your
relationships be the appropriate Package resources.  For example:

pkgdmg_install { "Office2008-1220UpdateEN.dmg":
        alias => ms_office_sp2,
        dirpath => "iasw/msoffice/",
        before =>  Package["Office2008-1211UpdateEN.dmg"]
}

That does rely a bit on knowledge of the implementation of
pkgdmg_install.  If you don't like that (and perhaps you shouldn't),
or if that suggestion doesn't work, then the next refinement would be
to update the definition to accept an optional "before-package" (or
similarly named) parameter, which you then use to directly set the
Package - Package dependency, instead of using the 'before' parameter
on the defined type.

Good Luck,

John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to