gusto2
gusto2

Reputation: 12075

wso2-puppet variable scope

I'm trying to deploy WSO2 products using puppet (v 3.8.7, master/agent setup) and provided puppet scripts. Apart small details ( undefined wso2::hosts_template variable, usage of ensure_resource , ...), my fact tests are blocked with undefined template variables.

In my role definition I create a new products instance, e.g.

class { 'wso2am':

}

and I set a few facts:

product_name: wso2am
product_version: 2.0.0
product_profile: default
platform: default
vm_type:

which should install the wso2am with default settings

The error message is as follows:

 undefined method `each' for nil:NilClass
(erb):25:in `get_binding'
/nix/store/xivrmfsyc7dc52m1zv1g52ziwjag5n4f-ruby-2.3.3/lib/ruby/2.3.0/erb.rb:864:in `eval'
...
 in ./modules/wso2am/templates/2.0.0/repository/conf/datasources/am-datasources.xml.erb at # SourcePos {sourceName = "./modules/wso2base/manifests/push_templates.pp", sourceLine = Pos 26, sourceColumn = Pos 10}

where I believe the template parameter am_datasources is undefined. Indeed I see in the modules/wso2base/manifest/init.pp the parameter is loaded from the hieradata, but the template parameters (am_datasources is only one of them) are never passed to the invoked defines (wso2base::push_templates) directly.

Does the script assume some environmental setup or extra data visibility?

Upvotes: 1

Views: 60

Answers (1)

Bee
Bee

Reputation: 12502

It should work if you have am_datasources defined in default.yaml like this.

Upvotes: 0

Related Questions