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 first try was like this, but it isn't working well.

$name_underscore = "`echo $name | sed 's/\./_/g'`"

  file { "*/etc/sudoers.d/*${name_underscore}":
    mode => 440,
    owner => "root",
    group => "root",
    content => template("sudo/sudo.erb"),
    }

Please can anyone help me with my problem?

Best regards,

Markus Rekkenbeil

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/5WXIuAeLgmkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to