Hi Garrett,

do you mean to add the lines again, with file_line? I thought about this 
option, too. 

It would be a great way to uncomment this lines, but if it is easier with 
file_line, I will do it so.

Am Donnerstag, 25. Juni 2015 09:08:44 UTC+2 schrieb Garrett Honeycutt:
>
> On 6/25/15 2:09 AM, hoize wrote: 
> > Hello! 
> > 
> > I want to uncomment a line in a file, for example: 
> > 
> > _/root/.bashrc_ 
> > # export LS_OPTIONS='--color=auto' 
> > 
> > 
> > _after change:_ 
> > export LS_OPTIONS='--color=auto' 
> > 
> > After some searching for a solution, I found the Augeas-Tool and then 
> > the Augeas-Shellvar-Provider. 
> > So I tried it: 
> > 
> >   shellvar { "export LS_OPTIONS": 
> >     ensure  =>  present, 
> >     target  =>  "/root/.bashrc", 
> >     uncomment =>  true, 
> >   } 
> > 
> > But I always get this error, regardless how I paraphrase the ressource 
> > "shellvar". 
> > 
> > An alternative solution would be great, too. But with the file_line 
> > ressource, I can't imagine, that there is an very short and easy way. 
> > 
> > I hope someone can help me! 
> > 
> > Thank You! 
> > 
> > Hoize 
>
> Hi Hoize, 
>
> Since we're talking about a comment, does it really matter if it is 
> still in the file? Bash certainly does not think so. The file_line() 
> function should work well for you if you want to manage individual lines 
> as opposed to the entire file. I would recommend this approach for its 
> simplicity instead of Augeas. 
>
> Best regards, 
> -g 
>
> -- 
> Garrett Honeycutt 
> @learnpuppet 
> Puppet Training with LearnPuppet.com 
> Mobile: +1.206.414.8658 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c69026bf-0c3f-448d-ac7a-dc31c9c08b6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to