summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/type.rb25
1 files changed, 19 insertions, 6 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index e03650b54..f70a3ec0b 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -957,12 +957,25 @@ class Type
end
newmetaparam(:audit) do
- desc "Audit specified attributes of resources over time, and report if any have changed.
- This attribute can be used to track changes to any resource over time, and can
- provide an audit trail of every change that happens on any given machine.
-
- Note that you cannot both audit and manage an attribute - managing it guarantees
- the value, and any changes already get logged."
+ desc "Marks a subset of this resource's unmanaged attributes for auditing. Accepts an
+ attribute name or a list of attribute names.
+
+ Auditing a resource attribute has two effects: First, whenever a catalog
+ is applied with puppet apply or puppet agent, Puppet will check whether
+ that attribute of the resource has been modified, comparing its current
+ value to the previous run; any change will be logged alongside any actions
+ performed by Puppet while applying the catalog.
+
+ Secondly, marking a resource attribute for auditing will include that
+ attribute in inspection reports generated by puppet inspect; see the
+ puppet inspect documentation for more details.
+
+ Managed attributes for a resource can also be audited, but note that
+ changes made by Puppet will be logged as additional modifications. (I.e.
+ if a user manually edits a file whose contents are audited and managed,
+ puppet agent's next two runs will both log an audit notice: the first run
+ will log the user's edit and then revert the file to the desired state,
+ and the second run will log the edit made by Puppet.)"
validate do |list|
list = Array(list).collect {|p| p.to_sym}