Issue #4155 has been reported by christian c.
----------------------------------------
Bug #4155: Using variables in regex
http://projects.puppetlabs.com/issues/4155
Author: christian c
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Affected version: 0.25.4
Keywords: regex variable regular expression
Branch:
It seems as if it is not possible to match the content of a variable in a regex:
$users = "peter root user1 wwwrun"
$username = "user1"
file { "userdata.tar.bz2":
source => "puppet://$server/modules/$module/userdata.tar.bz2",
ensure => $users ? {
/${username}/ => absent,
default => present,
},
}
I did quite a lot variations in writing the variable (#{variable}, \$variable,
\$\{variable\}) but nothing worked.
If it's already possible, it would be nice to mention it in the docs.
Also see:
http://groups.google.com/group/puppet-users/browse_thread/thread/132d72437ac11095
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
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-bugs?hl=en.