querying unrealized/inactive resources in the catalog?

12 views
Skip to first unread message

Christopher Wood

unread,
Sep 14, 2017, 11:36:52 AM9/14/17
to puppet...@googlegroups.com
Is there a document somewhere that describes the visilibity of an unrealized and inactive resource in the downloaded catalog and puppetdb catalog?

I thought I would be able to retrieve inactive resources from somewhere in puppetdb, but I can't and that could be just me.

It would suit me perfectly if unrealized resources actually did not exist anywhere in the stored catalog so possibly I'm puzzled by the phrasing in the documentation, where it says that "unrealized virtual resources are included in the catalog, but they are marked as inactive".

https://docs.puppet.com/puppet/4.10/lang_virtual.html#behavior

Going deeper, I have the following scratch manifest (naming munged for privacy, conventions ignored for experimentation):

class role::test1 {

@file { 'aaaa':
content => "11\n",
path => '/tmp/a',
}

@file { 'bbbb':
content => "22\n",
path => '/tmp/b',
}

@file { 'cccc':
content => "33\n",
path => '/tmp/c',
}

realize(File['cccc'])

}

With that role applied to a host the cccc file resource appears in the catalog, both in puppetdb and downloaded, but aaaa and bbbb do not.

I can retrieve the cccc file resource via puppetdb query to /pdb/query/v4/resources/File/cccc but not the others (returns json []).
Reply all
Reply to author
Forward
0 new messages