On Thu, Nov 14, 2013 at 6:00 AM, Johan De Wit <[email protected]> wrote:
> Is it possible to assign default values to some custom types property,
> depending on some facts ?
>
> I'm thinking to assign default values to eg a configdir property of my
> type depending on the osfamily fact.
>
> eg on debian configdir defaults to /etc/ldap/slapd.d,
> on redhat configdir defaults to /etc/openldap/slapd.d
>
Maybe something along these lines in the resource provider (pseudocode):
def path
resource[:path] ||
case Facter.value :osfamily
when 'RedHat'
'/etc/openldap/slapd.d'
when 'Debian'
'/etc/ldap/slapd.d'
end
end
Nan
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/CACqVBqBp8ZBgFYET4wwh-mZbMyNB1fs_W4_Z8C%3DH2GH4Vu%3Dw4g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.