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 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 -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at groups.google.com/group/puppet-users?hl=en. For more options, visit groups.google.com/groups/opt_out.
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 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at groups.google.com/group/puppet-users?hl=en. For more options, visit groups.google.com/groups/opt_out.
thanks a lot for webmin, it''s good!!! Le lundi 29 avril 2013 14:52:42 UTC+2, Stan a écrit :> > 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 > > 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 >-- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at groups.google.com/group/puppet-users?hl=en. For more options, visit groups.google.com/groups/opt_out.