Issue #13226 has been updated by Daniel Pittman.
Randall Hansen wrote:
> IOW modify this ticket to something like "puppet resource should always
> return read-only attributes and always comment them?" I think that's quite
> sensible. I can't think of anything it would break.
Yeah. I worry a little about the presentation, since you would get something
like:
<pre>
file { '/tmp':
ensure => 'link',
# ctime => 'Tue Nov 08 10:32:12 -0800 2011',
group => '0',
mode => '755',
# mtime => 'Tue Nov 08 10:27:22 -0800 2011',
owner => '0',
target => 'private/tmp',
type => 'link',
}
</pre>
...which might be seen as less than perfect. We could obviously sort to put,
eg, commented attributes at the tail of the list, rather than in whatever order
they presently are.
----------------------------------------
Bug #13226: puppet resource should not return unusable attributes
https://projects.puppetlabs.com/issues/13226#change-58529
Author: Ryan Coleman
Status: Accepted
Priority: Normal
Assignee: Randall Hansen
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
Example:
<code>
[root@centos6 ~]# puppet resource file /etc/sudoers
file { '/etc/sudoers':
ensure => 'file',
content => '{md5}25e8c9fee3af1a108332dc2cd985f41f',
ctime => 'Sun Mar 18 05:21:44 +0100 2012',
group => '0',
mode => '440',
mtime => 'Sun Mar 18 05:21:44 +0100 2012',
owner => '0',
type => 'file',
}
</code>
Puppet resource returns attributes like type, which are read-only and not valid
in a manifest a user would write. This is ok for inspection but if a user adds
'-e' to the above command, modifies a property and writes out of the editor,
puppet will fail.
Running with `-e`, we should show these attributes commented:
# type => 'file' # Read-only attribute
--
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.