On Jun 6, 12:33 pm, Andrei-Florian Staicu <andrei.sta...@gmail.com> wrote: > First, for services that have ensure=>runnig and for which "service > bla status" returns not running, can puppet be convinced to call > "service bla restart" instead of "service bla start"?
That's a very odd request. If the service is indeed not running, then "service bla start" is the correct way to set it running. If "service bla status" is returning an incorrect result -- that is, if it sometimes says the service is not running when actually it is -- then fixing that would be an all-around better solution (i.e. not just for interoperation with Puppet). If you cannot or will not fix the initscript, then you can use the Service's 'status' parameter to provide an alternative command by which to determine whether the service is running. > Second question, about class dependencies. I have a class called > network, with a subclass networ::device, which I use to deploy the > ifcfg-* files. So, for a node, i will have an undefined number of > network::device objects. No, you don't. Perhaps you have a *defined type* network::device, but if that were a class then each node would have it either once or not at all. It is important to know the difference because it affects several aspects of how you design and write your manifests. > Furthermore, I have a class called > network::ipconfig2. How can I make sure that network::ipconfig2 will > be applied only after all the network::devices are applied? This is what resource relationships are for. A good use in this case would be for each declaration of a network::device instance to specify a 'before' parameter. For example, network::device { 'eth0': # ... before => Class['network::ipconfig2'] } That will do the job correctly no matter how many network::device instances are declared (including zero), and it does not require class network::iproute2 to know which network::device resources have been or will be declared. It does, however, require that Class['network::ipconfig2'] be already declared at the point where the Network::Device instance is declared (and there are several ways to ensure that). 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.