Issue #12138 has been updated by Stefan Schulte.

The normal behaviour of puppet is it only manages the aspects of a resource 
that you specified. This is true for quite a lot of resources. Let's take the 
user resource as an example:
<pre>
user { 'root':
  ensure => present
  uid    => 0,
}
</pre>

Puppet will just make sure that the user root is present, it doesn't care about 
the gid, the comment, optional group entries etc. And this is a good think 
because you might want to allow some custom variations (or you dont care about 
certain aspects of a resource)

The same is true for the host properties `host_aliases` and `comment`. What you 
can do however is:
<pre>
host { 'localhost':
  ensure       => present,
  ipaddress    => 127.0.0.1,
  host_aliases => [], # make sure there are no aliases
  comment      => '', # make sure there is no comment
}
</pre>
Does this solves your problem?
----------------------------------------
Bug #12138: Host resource should manage comment property
https://projects.puppetlabs.com/issues/12138

Author: Hunter Haugen
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


When using the `host` resource, if a host entry has a comment but the resource 
managing that entry either has no `comment =>` attribute, or if it has `comment 
=> undef` then the comment is untouched in `/etc/hosts`.

I would expect either of these options to *remove* the comment, and it only to 
be present if it is specified in the `host` resource.


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

Reply via email to