Issue #3380 has been updated by Jason Antman.
IMHO this should really be reopened as a feature request. There has to be some
agreeable way of representing this. I'd be perfectly happy with just adding a
comment "ONLY {text of conditional expression}", i.e. "ONLY if
$::operatingsystem == "foo"", after the resources. I'm sure I'm not alone in
saying that I have a fair amount of code wrapped in if or case statements (that
only executes if a fact has a certain value), and it really reduces the
usefulness of puppetdoc to not include this. Ideally, I'd love it if:
1) this were a switch (--include-conditional) so it doesn't change output for
other users
2) the resources within conditionals were visually distinct (i.e. background
color) and labeled with their matching conditional (not sure how nesting would
work).
Right now, the docblocks at the top of many of my manifests are littered with
many lines of stuff like:
== Resources Not Listed Below:
- File["foo"] if $::operatingsystem == "SLES"
- Package["foo-sles"] if $::operatingsystem == "SLES"
- Package["foo-devel-32bit"] if $::architecture == "x86_64"
etc.
----------------------------------------
Bug #3380: puppetdoc doesn't generate documentation for resources inside
conditionals
https://projects.puppetlabs.com/issues/3380#change-56364
Author: Florian Wagner
Status: Rejected
Priority: Normal
Assignee: Brice Figureau
Category: documentation
Target version:
Affected Puppet version: 0.25.4
Keywords:
Branch:
When documenting a class such as the following puppetdoc generates a
documentation entry for the class itself but not for its contained resources:
class test {
if(false) {
# the documentation
file { "/abc":
mode => 775,
}
}
}
It is independent of the evaluation of the conditional. Even if(true) { ...
doesn't result in documentation.
--
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.