you can use inline_template to sanitize your values.. e.g.:

$my_type = inline_template("<%= type.upcase %>

Ohad

On Fri, May 28, 2010 at 2:44 PM, Adam Winberg <[email protected]>wrote:

> Hi,
>
> facter variables typically have values in lower case. We are looking
> into moving to puppet for our config administration and are currently
> using a system where we do file name matching dependent on specific
> suffixes - for example a file named "*--LAPTOP" will only be deployed
> on machines tagged as laptops.
>
> I would like to keep this naming convention and observed that facter
> has a "type" variable that on laptops will contain the value "laptop"
> - but of course i want it in upper case for, in my opinion, better
> clarity. Is there some smart way of doing this?
>
> I guess i could do something like
> if $type == "laptop" {
>  $type = "LAPTOP"
> }
>
> but im looking to see if there is any other smarter ways of doing
> this.
>
> Thanks,
>
> //Adam Winberg
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to