On Mar 24, 2014, at 2:46 AM, A. Gorlov <gorlo...@gmail.com> wrote:

> Hi All.
> How I post more parameters to define,  for example key type and fqdn   in 
> this sample?
> 
> $keys = [[ "key1", "key2" ]
> pubkey { $keys: user => $login  }
> 
> define pubkey($user) {
>       ssh_authorized_key { "${user}@fqdn-${name}":
>         ensure => present,
>         key    => $name,
>         user   => $user,
>         type   => dsa,
>       }
>     }


Parameters can be passed in as a comma-separated list:

    define pubkey ($user, $key_type, $fqdn) { ... }

You can also set defaults for the parameters where it makes sense:

    define my_type ($param1 = "foo" , $param2 = "bar", $param3) { ... }

--
Peter Bukowinski

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/48D8443B-898E-4CB8-952C-89DE2C120D77%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to