creating epp for codedeployagent conf.yml

asked 2017-06-27 11:47:17 -0500

When attempting to create the conf.yml for aws codedeployagent, Im having issues setting the variables as variables.

The conf needs to look like this:

#START of File

:logdir: 'Amazon/CodeDeploy/log' :rootdir: 'Amazon/CodeDeploy' :verbose: true :waitbetweenruns: 1 :waitaftererror: 1 :bundlename: 'artifactbundle.tar'

:proxyuri: 'http://awsproxy_prod:A!wsp123@proxy.glic.com:8080/'

END of File

Therefore, the variables are: :logdir: :rootdir: :verbose: waitbetweenruns: etc... you get the idea.

Puppet does not like the variable names to include ":"

How can I get around this???

Here is the current error i am getting:

When attempting to create the conf.yml for aws codedeployagent, Im having issues setting the variables as variables.

The conf needs to look like this:

#START of File

:logdir: 'Amazon/CodeDeploy/log' :rootdir: 'Amazon/CodeDeploy' :verbose: true :waitbetweenruns: 1 :waitaftererror: 1 :bundlename: 'artifactbundle.tar'

:proxyuri: 'http://awsproxy_prod:A!wsp123@proxy.glic.com:8080/'

END of File

Therefore, the variables are: :logdir: :rootdir: :verbose: waitbetweenruns: etc... you get the idea.

Puppet does not like the variable names to include ":"

How can I get around this???

Here is the current error i am getting:

Error: Evaluation Error: Error while evaluating a Function Call, 'inlineepp' parameters' key of entry ':proxyuri:' expects a match for Pattern[/^\w+S/], got ':proxy_uri' at C:/ProgramData/PuppetLabs/code/environments/production/modules/codedeploy/manifests/conf.pp:33:16 on node XXXX.com

Here is my conf.pp:

class codedeploy::conf inherits codedeploy::params { assert_private()

$logdir = ":logdir:" $rootdir = ":rootdir" $verbose = ":verbose:" $waitruns = ":waitbetweenruns:" $waiterror = ":waitaftererror:" $bundle = ":bundlename:" $proxyvar = ":proxyuri:"

$codedeployconftemplate = @(END)


<%- | $logdir = 'Amazon/CodeDeploy/log' | -%> <%- | $rootdir = 'Amazon/CodeDeploy' | -%> <%- | Boolean $verbose = true | -%> <%- | Integer $waitruns = 1 | -%> <%- | Integer $waiterror = 1 | -%> <%- | $bundle = 'artifact_bundle.tar' | -%>

<%- | $proxyvar = "http://aws#############@#####.com:8080/" | -%> END

file { ["${parentdir}", "${confpath}"]: ensure => directory, }

file { "${confpath}${conffile}": ensure => present, require => File[["${parentdir}", "${confpath}"]], content => inlineepp($codedeployconftemplate, { $proxyvar => "${proxyuri}" }) }

}

edit retag flag offensive close merge delete