Well what I am trying to do is to create A file with data from Hiera.
I am using this module:
https://github.com/GRIF-IRFU/puppet-omd plus the one I have just developed to add new sites, hosts and commands. However, I have been asked to create Business Intelligence rules which takes some IP addresses and the same number of services and group them together.
Let's say, I've got 10 nodes with 10 services each. In the
bi.mk file I have to declare a rule which looks as follows:
aggregation_rules["customer"] = {
'aggregation': 'worst!1!2',
'comment': u'All the services associated with the customer',
'nodes': [(u'10.0.0.1', u'service1_ssl'),
(u'10.0.0.2',
u'service1_101'),
(u'10.0.0.3',
u'service1_103')],
'params': [],
'title': u'Customer Services'
}
So therefore, what I am trying to do, is that I've got a template which does this for me, and I have specified A CLASS instead of define as you've said I was getting an error saying that the couldn't associate alias because file it is already declared (because of its path). So, the class i've created makes a file from an erb template. However, when I am running Puppet I just get printed in the file the name of the class instead of the data.
I was thinking about using concat but I am a Puppet beginner and I am not really sure how to go about incorporating the erb logic in the concat function.
Thank you,
Kind regards,
Sergiu