Douglas Garstang wrote:
> The docs at http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial say:
> 
> file { "/etc/config":
>     owner => $operatingsystem ? {
>         "sunos"   => "adm",
>         "redhat"  => "bin",
>         default => undef,
>     },
> }
> 
> I have this..
> 
>     file {
>         "home_dirs":
>             name => $domain ? {
>                 "corp.xxx.com" => "/u",
>                 "fr.xxx.com" => "/home",
>             },
>             ensure => directory;
>     }
> 
> 
> As a result of this, on the remove end in the log files I see:
> 
> (//Node[corporate_node]/ldap::client/File[home_dirs]/ensure) created
> 
> which in my opinion is confusing and hard to read. I want to see:
> 
> (//Node[corporate_node]/ldap::client/File[/home]/ensure) created
> 
> How can I refactor the manifest to do this? Basically I want to remove
> the use of the symbolic 'home_dirs" name.

 >     $blah = $domain ? {
 >                 "corp.xxx.com" => "/u",
 >                 "fr.xxx.com" => "/home",
 >             },
 >     file {
 >         $blah:
 >             ensure => directory;
 >     }


Regards, DavidS

--

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