Hello,
I have a define like this :
define application::install($root,$url,$user="root")
{
include git
#Puppet wants a command to start with /something...
$cmd="/bin/echo 1&&{ cd $root||mkdir $root&&cd $root ; }&&git clone -b
prod $url ."
$unless="/bin/ls -alh $root |grep '.git'"
exec{"$cmd":
command=>$cmd,
unless=>$unless,
user=>$user,
require=>Package["git"]
}
}
being called with a class :
class applications($apps)
{
create_resources(application::install,$apps)
}
and
$apps = {
test => {
url=> "https://mygitrepos/myapp.git",
root=> "/opt/apps/myapp",
user=>"root",
require=>Class[myclass],
}
}
class "myclass" is included by some other module
I get :
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Invalid relationship: Application::Install[test] { require =>
Class[myclass] }, because Class[myclass] doesn't seem to be in the catalog
but the class *is* really included.
For instance, if I do not require in $apps but require in the exec{}, it
will work just fine. Ofc I won't do this because I need things to be
dynamic.
Expected behavior is it should work, unless I missed something.
Any help welcome.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/4a25b0c0-64a6-4b4d-bdd6-cf13a0ed5738%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.