create_resources not working in 4.x?

32 views
Skip to first unread message

Jakov Sosic

unread,
Nov 12, 2015, 11:05:05 PM11/12/15
to Puppet Users
Hi guys,

I'm having difficulties with create_resources in latest 4.x master/agent
combo...

This is the example create_resources call:


$logstash_configs = hiera_hash('logstash::configfiles', {})
create_resources('::logstash::configfile', $logstash_configs)


This was working ok in version 3.x, but in version 4 hash is picked up
from hiera (verified via notfiy resources), but create_resources doesn't
create anything.



I even tried this:

create_resources('::logstash::configfile', {'indexer.conf' => {source
=> 'puppet:///modules/private/logstash/indexer.conf'}} )

And still file doesn't get created in /etc/logstash/conf.d/


I have similar issues with other modules where I use this kind of
create_resources call, so I don't think it's logstash related.



Any ideas?

jcbollinger

unread,
Nov 13, 2015, 10:31:16 AM11/13/15
to Puppet Users


On Thursday, November 12, 2015 at 10:05:05 PM UTC-6, Jakov Sosic wrote:
Hi guys,

I'm having difficulties with create_resources in latest 4.x master/agent
combo...

This is the example create_resources call:


   $logstash_configs = hiera_hash('logstash::configfiles', {})
   create_resources('::logstash::configfile', $logstash_configs)


This was working ok in version 3.x, but in version 4 hash is picked up
from hiera (verified via notfiy resources), but create_resources doesn't
create anything.



Does the master emit any relevant diagnostics into its log?

Have you tried giving the resource type string without the leading "::"?  IMO, it should work either way, but the example in the docs does not use the "::".


John

Reply all
Reply to author
Forward
0 new messages