我正在尝试在ubuntu 16.04上自动安装Jenkins。我已经安装了puppet,当我尝试使用以下代码安装Jenkins的命令puppet apply filename.pp
时,它只返回
注意:在0.01秒内环境生产中的trial-ubuntu.attlocal.net的编译目录 注意:完成的目录在0.07秒内运行
并且没有安装Jenkins。我做错了什么?
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 - ',
}
file { "/etc/apt/sources.list.d/jenkins.list":
mode => 644,
owner => root,
group => root,
source => "puppet:///modules/jenkins/etc/apt/sources.list.d/jenkins.list",
require => Exec['install_jenkins_package_keys'],
}
exec { 'apt-update':
command => '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'],
}
}