What am i doing wrong on this puppet code to install jenkins?

asked 2017-06-19 19:36:51 -0500

dontke gravatar image

updated 2017-06-20 06:25:55 -0500

rajeevsharma gravatar image

Please help, I am trying to automate installation of jenkins on a vagrant machine but I cant get the code below to work. I get an SSH error and the port is not set to 9999. Sorry the post looks scattered..It's my first time asking..

 class jenkins {
 exec { 'install_jenkins_package_keys':
 command => '/usr/bin/wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | /usr/bin/apt-key add - ',
}

exec { 'apt-update':
command => '/usr/bin/apt-get update',
require => File['/etc/apt/sources.list.d/jenkins.list'],
}

package { 'jenkins':
ensure => latest,
require  => Exec['apt-update'], 
}

service { 'jenkins':
ensure => running,
require => Package['jenkins'],
} 

file { "/etc/apt/sources.list.d/jenkins.list":
mode => 644,
owner => root,
group => root,
content => "deb http://pkg.jenkins-ci.org/debian binary/\n",
require  => Exec['install_jenkins_package_keys'],   
}
}

class {
"jenkins'::config_hash" : {
'HTTP_PORT' => { 'value' => '9999' },
 }
}
edit retag flag offensive close merge delete

Comments

1

Can you maybe provide the error? and maybe also the jenkins config hash class? Also there is a single quote in the name when you call it this is not an allowed character for the class. "jenkins'::config_hash" -> "jenkins::config_hash"

negast gravatar imagenegast ( 2017-06-21 08:54:34 -0500 )edit