Feature #2186
Some introspection capabilities about Files
| Status: | Accepted | Start date: | 04/22/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | file | |||
| Target version: | - | |||
| Affected Puppet version: | 0.25.0 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
Allow the user to ask some introspection query about files, the following examples use arbitrary options :
- What is the reference file for a specific file ?
# puppet /etc/puppet/manifest/site.pp --which-source-file /etc/sysconfig/security.conf Src file /etc/puppet/services/files/security.conf
- What is the difference between the actual file and the reference file ?
# puppet /etc/puppet/manifest/site.pp --diff-with-reference-file /etc/sysconfig/security.conf 1c1,2 < file1 --- > file2
- Which manifest define a specific file ?
# puppet /etc/puppet/manifest/site.pp --which-manifest-file /etc/sysconfig/security.conf Content is defined in class security in '/etc/puppet/services/manifests/conf.pp'
I don’t know which command should handle this request and how to manage the fact that the answers depend on the node and the facts, but I think that this features can be very useful to maintain manifests when there is several administrators.
History
Updated by Stéphan Gorget old account about 3 years ago
- Subject changed from Some introspection capability about Files to Some introspection capabilities about Files
Updated by James Turnbull about 3 years ago
- Category set to file
- Status changed from Unreviewed to Needs Decision
- Assignee set to Luke Kanies
- Target version set to 4
Updated by Luke Kanies about 3 years ago
- Status changed from Needs Decision to Accepted
- Assignee changed from Luke Kanies to Puppet Community
While I think this is a good idea, I think it’s a good bit more work than is obvious. The simple cases are relatively simple – load the catalog and look for a file of that name. But the hard cases aren’t that simple, because they require recursion.
I’d accept this patch, but I think it’s a good bit of work. And really, it’s probably either a different executable focused on introspecting the catalog, or an addition to puppetd.
Updated by James Turnbull almost 3 years ago
- Assignee deleted (
Puppet Community)
Updated by James Turnbull 9 months ago
- Target version deleted (
4)