Re: [Puppet Users] hiera() variables with the same name lookup in different modules

98 views
Skip to first unread message

R.I.Pienaar

unread,
Sep 21, 2012, 7:21:27 AM9/21/12
to puppet...@googlegroups.com


----- Original Message -----
> From: "Vaidas Jablonskis" <jablo...@gmail.com>
> To: puppet...@googlegroups.com
> Sent: Friday, September 21, 2012 12:16:11 PM
> Subject: [Puppet Users] hiera() variables with the same name lookup in different modules
>
> Hi poeple,
>
> I seem to have a slight issue with Hiera. Let's say I have a number
> or different modules and they have multiple variables, but some of
> the variables have the same name like other modules. For instance
> $password variable in module "foo" and $password variable in module
> "bar".
>
> How can I distinguish them from each other in my hiera yaml files? I
> am aware of %{calling_module}, but that requires adding more items
> into my hierarchy and making management of yaml data files painful.

if class mysql needs password and class ftp needs password then name the
data mysql::password and ftp::password, use that as keys for the call
to hiera

does that work?

Vaidas Jablonskis

unread,
Sep 21, 2012, 8:47:06 AM9/21/12
to puppet...@googlegroups.com
It does! Thanks a lot. Simple, but powerful.
Reply all
Reply to author
Forward
0 new messages