我试过了:
# jenkins.pp
class jenkins {
yumrepo { "jenkins":
baseurl => "http://pkg.jenkins-ci.org/redhat",
descr => "Jenkins",
enabled => 1,
gpgcheck => 1,
gpgkey => "http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key",
}
#package {"jenkins": ensure => latest}
package {"jenkins": ensure => "1.509.1"}
}
include jenkins
但它仍然安装最新版本,而不是 LTS 版本,即 1.509.1