Yo, On 24/09/2009, at 12:48 PM, Brian O'Rourke wrote:
Technically under the hood the majority of our resources and providers are migration-style, yet the DSL you declare desired state in has no concept of a migration - it is just a target. service "foo" do action: start end On a system with the service 'foo' stopped, this will start it; while running, it will not. File and Template compare checksums of content [when applicable]. Other resources do not have any built in idempotency - guards must be added via only_if or not_if. If you *really* think you need this behaviour, leveraging a simple bool node attribute will suffice: if node.crazy_app.do_crazy_stuff all_vhosts.each do |vhost| remote_file "/etc/apache2/sites-enabled/#{vhost[:server_name]" do source vhost[:server_name end ... end Toggle it via attributes, a Role, the webUI/API or a JSON override file Regards, HTH! |
Archive powered by MHonArc 2.6.16.