Hello,


On Monday, April 29, 2013 2:52:42 PM UTC+2, Stan wrote:
>
> Hello
>
> I use augeas to replace a value in a config file:
>
> example (this example is good) :
>
> /etc/ssh/sshd_config file
>
> LogLevel INFO
>
>
> class ssh::redhat {
> augeas { "sshd_config":
>   context => "/files/etc/ssh/sshd_config",
>   changes => [
>     "set LogLevel VERBOSE",
>   ],
>   notify => Service["sshd"],
> }
>
> This configuration is good
>
>
As a note, I would recommend using the `sshd_config` type from 
http://augeasproviders.com/documentation/examples.html#sshd_config_provider 
instead, 
as it manages more edge cases (and still uses Augeas in the background).

 

> but how do when the file is written like this:
>
> parameter = value (with =)
>
>
> /etc/webmin/config file
>
> lang = us
>
>
> class webmin::redhat {
> augeas { "config":
>   context => "/files/etc/webmin/config",
>   changes => [
>     "set "lang =" fr]",
>   ],
>         }
> }
>  
>
this configuration is not good, did you have an idea?
> regards
>


The sshd_config example worked because /etc/ssh/sshd_config is a file known 
to Augeas, as it is listed in the sshd.aug module. /etc/webmin/config 
however, is not known to Augeas.

You might want to try the Webmin lens on it:

    augeas { 'webmin config':
      lens => 'Webmin.lns',
      incl => '/etc/webmin/config',
      changes => [ 'set lang fr' ],
    }
 
If that doesn't work, you can try the Simplevars.lns lens instead.


Regards,

Raphaƫl

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to