rtyler jenkins module job_hash in hiera issue, any examples out there?

asked 2015-04-13 12:04:47 -0600

dhirenp gravatar image

updated 2015-04-13 14:40:48 -0600

I have having problems structuring the job_hash for the rtyler jenkins module. It works if i just add the jobs needed in manifest file but i want to define the jobs in hiera then, it gives errors.
This is what i have in my common.yaml file:

 jenkins::params::job_hash : 
    'test-build-job' : { ensure : 'present', enabled : 0, config : template("${templates}/build.xml.erb" ) },
    'test-build-test2' : { ensure : 'present', enabled : 0, config : template("${templates}/build.xml.erb" ) }

Error i get is :

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: (<unknown>): expected ',' or '}', but got FlowMappingStart while parsing a flow mapping at line 24 column 85 at /etc/puppetlabs/puppet/environments/production/modules/jenkins/manifests/params.pp:5

Can somebody here with proper example format or tell me what might be issue here?


Seems the template("${templates}/build.xml.erb")} is causing issues.

If i remove the { }, than it works fine.

edit retag flag offensive close merge delete