On Wednesday, July 8, 2015 at 9:43:01 AM UTC-5, Hiranmoy Khan wrote: > > Hello, > > I am trying to call module A from module B if variable Y is false. > And if module B executed successfully then variable var1 = true. > But not sure about the syntax. >
You're not sure about the semantics. Most of what you're saying you want to do doesn't make any sense, so syntax doesn't even enter the picture. Puppet modules are not executable in the sense you seem to suppose, and you certainly cannot "call" them. The function of modules and classes is to direct the construction of a catalog of resources to be applied to the target node, and their success or failure has nothing to do with whether the resources are (later) successfully applied. When they do fail, the result is a parse error, which will always terminate catalog compilation. There is a sense in which modules and classes have behavior during catalog building, but at least until you really understand that sense, you will cause yourself a lot of grief by attempting to approach Puppet DSL as if it were an imperative language. Your choice of terminology suggests that that is what you are doing. If you have a more concrete example to discuss then we could talk about how to approach your underlying objectives via idiomatic Puppet DSL. John -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f4bd3a65-c860-4ae6-877f-27606bf5754c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.