http://docs.puppetlabs.com/man/apply.html does not mention a --noop
parameter, but it works:

capmon@peter:~> puppet apply --noop -e 'file { "/tmp/foo": ensure => present }'
notice: /Stage[main]//File[/tmp/foo]/ensure: is absent, should be present (noop)

Can I rely on this in future versions? If so, attached is a patch.

This is very handy for us, so I hope we can rely on it, but if not, why not?

Peter

-- 
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.

From da0cea73be49fbfb35eb6a51717188433f6be44a Mon Sep 17 00:00:00 2001
From: peter <pe...@morch.com>
Date: Tue, 14 Feb 2012 19:29:20 +0100
Subject: [PATCH] Add documentation for puppet apply --noop

---
 lib/puppet/application/apply.rb |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb
index f661734..7711ac4 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -53,7 +53,7 @@ Applies a standalone Puppet manifest to the local system.
 USAGE
 -----
 puppet apply [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose]
-  [-e|--execute] [--detailed-exitcodes] [-l|--logdest <file>]
+  [-e|--execute] [--detailed-exitcodes] [-l|--logdest <file>] [--noop]
   [--apply <catalog>] [--catalog <catalog>] <file>
 
 
@@ -107,6 +107,11 @@ configuration options can also be generated by running puppet with
   Where to send messages. Choose between syslog, the console, and a log
   file. Defaults to sending messages to the console.
 
+* --noop:
+  Use 'noop' mode where Puppet runs in a no-op or dry-run mode. This
+  is useful for seeing what changes Puppet will make without actually
+  executing the changes.
+
 * --execute:
   Execute a specific piece of Puppet code
 
-- 
1.7.2.5

Reply via email to