Issue #7332 has been updated by Nigel Kersten.
Frederik Wagner wrote:
> Sounds more or less right, this being a dupe of #7594. But I'm not sure if
> that one is covering also pre/post condition to a resource, like my example:
> Having a service stopped during a resource execution. I would add that (if
> that's not overloading the DSL).
The idea would be that you could do something like this:
<pre>
exec { "pre":
notify => Service["foo"].stop,
}
exec { "post":
notify => Service["foo"].start,
}
service { "foo":
ensure => running,
enable => true,
}
</pre>
Obviously this won't work right now due to the automatic relationships we set
up with notify, but that would have to change.
----------------------------------------
Feature #7332: resource pre / post condition on e.g. service status
https://projects.puppetlabs.com/issues/7332
Author: Frederik Wagner
Status: Duplicate
Priority: Normal
Assignee: Nigel Kersten
Category: language
Target version:
Affected Puppet version:
Keywords: service, exec, conditions
Branch:
In certain circumstances it is need that a service is down during the
application of a resource. So it would be extremely usefull to have e.g. a
service stopped, have a resource applied and have a service started again.
For example, to run a `udevadm trigger` to rename network interfaces, the
service network should be down. So it would read on the shell:
<pre>
$ service network stop
$ udevadm trigger
$ service network start
</pre>
This can be straigt forwardly but very dirty implemented with `exec` resources
with dependencies, but it could interefere badly with an explicit `service`
resource (in this case checking for network running).
So some kine of resource pre/post condition on for the service would be very
usefull.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en.