On Friday, June 28, 2013 10:44:19 AM UTC-5, kashif wrote:
>
> Hi
>
> I am just testing  file_line type in puppetlabs stdlib library. It is a 
> very simple line
>
> file_line { 'testing file_line' :
>              ensure => present,
>               line => 'This is a test'
>               path => '/etc/puppet/puppet-test'
>             }
>
> It works but when I look at client log it seems that in every puppet run, 
> it removes  all of the lines added through file_line and then add it 
> again.  Is it a bug or feature ?
>
>

If Puppet were actually doing that then it would suggest a bug in stdlib, 
but I would be very surprised if that was what was really happening.

 

> I am using puppet 3.2 and stdlib 4.1.0.
>
>

A file_line resource should never cause the same line in the same file to 
be both removed and created during the same Puppet run.  Not only would 
such behavior constitute a poor implementation, inconsistent with my 
general expectations of the agent's behavior, but also my review of the 
code doesn't give me any reason to think it would manifest such behavior.

I could believe, however, that under certain circumstances Puppet fails to 
recognize the presence of the target line in the file, and therefore on 
every run it rewrites the file to add the line.  Multiple copies of the 
target line would result.

I could also believe that the log messages emitted by the file_line 
provider are misleading.

To definitively sort this out, however, we need details of a resource 
declaration and corresponding target file that trigger the behavior, and a 
--debug log excerpt (from the agent) showing the messages emitted by the 
provider when it applies that resource.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to