Require defined type in hash table,

asked 2018-02-07 11:58:22 -0600

PeteCarter gravatar image

updated 2018-02-07 12:02:46 -0600

I have a defined type called


which calls an exec block and works fine.

I am using the following create resource statement in my init manifest:

create_resources( profile_winsql_dbengine::resources::sqlconfighelper, $sqlconfighelperhash )

The hash is declared as follows:

$sqlconfighelperhash = { 'config1' => { param1 => $param1, param2 => $param2, }, 'config2' => { param1 => $param1, param2 => $param2, require => Profile_winsql_dbengine::Resources::Sqlconfighelper['config1'], } }

Everything works as expected, with the exception of the require. The require throws a compilation error, telling me that it can't find Profile_winsql_dbengine::Resources::Sqlconfighelper['config1']

The syntax compiles, and without the require it applies the profile as expected. What should I do differently, to make the require work?

edit retag flag offensive close merge delete


How's the resource supposed to require itself? You can only require _other_ resources (in the same stage).

Kai Burghardt gravatar imageKai Burghardt ( 2018-02-07 13:10:30 -0600 )edit