Is there a way to read multiple hiera file from a datadir location?
164 views
Skip to first unread message
Sans
unread,
Dec 2, 2015, 1:09:18 PM12/2/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Puppet Users
Hi all,
Is there way to use multiple Hiera data-source yaml from a fixed location like: /etc/puppet/sites/clients/ ?
I see having something like this:
:hierarchy: - "clients/*" - default
doesn't really work for Hiera. The issues for me There gonna be 100s of .yaml in there and I don't want to over load my hiera.yaml with 100s of entries or edit that file every time we add new client's data. Or is there way to use RegEx name? I don't care in what order they are executed. How do I deal with this situation? Best!
Henrik Lindberg
unread,
Dec 2, 2015, 5:42:31 PM12/2/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
On 2015-02-12 19:09, Sans wrote:
> Hi all,
>
> Is there way to use multiple Hiera **data-source yaml from a fixed
> location like:/etc/puppet/sites/clients/ ?
>
No.
> I see having something like this:
>
> :hierarchy:
> - "clients/*"
> - default
>
>
> doesn't really work for Hiera. The issues for me There gonna be 100s of
> .yaml in there and I don't want to over load my hiera.yaml with 100s of
> entries or edit that file every time we add new client's data. Or is
> there way to use RegEx name? I don't care in what order they are
> executed. How do I deal with this situation? Best!
>
Add a build step that concatenates/combines all of your data files into
one file. Reference that file in your hiera.yaml.
Alernatively write your own backend that loads all of the files and
merges the result.