Puppet代码没有在ubuntu中安装jenkins

时间:2017-06-18 03:25:06

标签: jenkins puppet ubuntu-16.04 puppet-enterprise puppetlabs-apache

我正在尝试在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'],
 }
}

0 个答案:

没有答案