[Puppet Users] manifest variable with sed - problem

2012-07-25 Thread Markus Rekkenbeil
Hello, i have a problem in my sudo manifest file, because in the variable $name comes sometimes usernames like user.lastname, but i need for sudo (includedir */etc/sudoers.d/*) file names with no dots (like user_lastname). I need a new variable, where is the dots change by underscores. My fir

Re: [Puppet Users] manifest variable with sed - problem

2012-07-25 Thread Christopher Wood
On Wed, Jul 25, 2012 at 08:47:14AM -0700, Markus Rekkenbeil wrote: > Hello, > > i have a problem in my sudo manifest file, because in the variable $name > comes sometimes usernames like user.lastname, but i need for sudo > (includedir /etc/sudoers.d/) file names with no dots (like user_lastnam

RE: [Puppet Users] manifest variable with sed - problem

2012-07-25 Thread Kinzel, David
>From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] >On Behalf Of Christopher Wood [snip] >You could use an inline template to run the substitution via ruby. Example: > >$java_home = inline_template('<%= /jre-([0-9])u([0-9]+)/.match(name); p = >"/opt/jre1." + $1 + ".0_" +

Re: [Puppet Users] manifest variable with sed - problem

2012-07-25 Thread Christopher Wood
On Wed, Jul 25, 2012 at 04:43:31PM +, Kinzel, David wrote: > >From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] > >On Behalf Of Christopher Wood > > [snip] > > >You could use an inline template to run the substitution via ruby. Example: > > > >$java_home = inline_temp