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' },
}
}
↧