+1 for the feature; I like Jeff's idea about using the existing sigil,
although I like Henrik's nested-function-like suggestion.

I think there is a particular case for this when it comes to lazy/busy
sysadmins integrating 3rd party modules from Puppet Forge (and for
encouraging writing internal modules with a general enough interface that
they can easily be contributed):

Let's say I've got modules for configuring nss_pam_ldapd in EL6 and for
configuring the native Solaris ldap_cachemgr. Both need, among other
things, the list of LDAP server URIs. If I am not too lazy and thinking
seriously about contributing them to PF, I'll write them to do a hiera
lookup using the correct name for automatic parameter lookups (we're still
on 2.7 & working towards 3 compatibility):

class nss_pam_ldapd::config {
  $server_uris = hiera('nss_pam_ldapd::config::server_uris', ...),
  ...

class ldap_cachemgr::conig {
  $server_uris = hiera('ldap_cachemgr::config::server_uris, ...),
  ...

and now I have made more work for myself because I have to duplicate
(correctly) all of the info in hiera:

nss_pam_ldapd::config::server_uris:
  - ldaps://ldap1.example.com
  - ldaps://ldap2.example.com
 ...

ldap_cachemgr::config::server_uris:
  - ldaps://ldap1.example.com
  - ldaps://ldap2.example.com
 ...

whereas what I would like is:

ldap_login_server_uris:
 - ldaps://...

nss_pam_ldapd::config::server_uris: %{ldap_login_server_uris}
ldap_cachemgr::config::server_uris: %{ldap_login_server_uris}

but since I cannot do this and I am really lazy/busy, I'm going to be dumb
and just lookup 'ldap_login_server_uris' and everyone else who might have
benefited from the module can go stuff it:

class nss_pam_ldapd::config {
  $server_uris = hiera('ldap_login_server_uris')
  ...

And I am over-simplifying, because there are more like 8 parameters, almost
all of which apply between both modules and all of which need to be
duplicated.

Wil

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to