Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been working on learning puppet and using it to set up a jenkins box. I'm wiring jenkins through tomcat, since I may also end up running other webapps on there.

EDIT: I've installed (via puppet module install puppetlabs-stdlib) the stdlib provided by puppetlabs to use the file_line type.

This is puppet module manifest for setting up jenkins and tomcat and wiring the two together.

class tomcat_jenkins {
    ensure => installed,
    name   => 'java-1.7.0-openjdk',

    ensure  => installed,
    require => Package['java-1.7'],

    ensure  => installed,
    require => Yumrepo['jenkins'],

    name    => '/usr/share/tomcat6/webapps/jenkins.war',
    require => [Package['tomcat6'], Package['jenkins']],
    ensure  => link,
    target  => '/usr/lib/jenkins/jenkins.war',

  file{ '/srv':
    ensure => directory,
    owner  => 'root',
    group  => 'root',

  file{ '/srv/jenkins':
    ensure  => directory,
    owner   => 'tomcat',
    group   => 'tomcat',
    require => Package['tomcat6'],

    ensure  => present,
    path    => '/etc/tomcat6/tomcat6.conf',
    line    => 'JENKINS_HOME=/srv/jenkins',
    require => [Package['tomcat6'], File['/srv/jenkins']],

    ensure    => running,
    enable    => true,
    require   => [Package['tomcat6'], Package['jenkins'], File_line['jenkins_home']],
    subscribe => [Package['jenkins'], File['jenkins-symlink']],


I see the output from the puppet agent that it is properly applying the catalog, and it pretends like it went ahead and applied the changes, but there's no /jenkins/ in my /etc/tomcat6/tomcat6.conf file. I don't have anything else managing that file.

puppet agent -t -d output:

info: Applying configuration version '1343250206'
debug: /Stage[main]/Tomcat_jenkins/File_line[jenkins_home]/require: requires Package[tomcat6]
debug: /Stage[main]/Tomcat_jenkins/File_line[jenkins_home]/require: requires File[/srv/jenkins]
debug: /Stage[main]/Epel_repo/Yumrepo[epel]/require: requires File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6]
debug: /Stage[main]/Tomcat_jenkins/Package[jenkins]/require: requires Yumrepo[jenkins]
debug: /Stage[main]/Tomcat_jenkins/Service[tomcat6]/require: requires Package[tomcat6]
debug: /Stage[main]/Tomcat_jenkins/Service[tomcat6]/require: requires Package[jenkins]
debug: /Stage[main]/Tomcat_jenkins/Service[tomcat6]/require: requires File_line[jenkins_home]
debug: /Stage[main]/Tomcat_jenkins/Service[tomcat6]/subscribe: subscribes to Package[jenkins]
debug: /Stage[main]/Tomcat_jenkins/Service[tomcat6]/subscribe: subscribes to File[jenkins-symlink]
share|improve this question
Where are you finding that file_line is a valid resource? It doesn't appear as a standard resource type on the official documentation. – Zoredache Jul 25 '12 at 21:21
Sorry, it comes from the puppetlabs/stdlib module: Which I have puppet module installed – BeepDog Jul 25 '12 at 21:26
up vote 10 down vote accepted

Asking around on #puppet on, I found out that I was missing a configuration parameter on the puppet agent. I needed:


in the [main] section. After adding that line, it happily downloaded the plugins, and set up my stuff. Win.

share|improve this answer
You can also use --pluginsync if you're messing on the command line. – Gerald Kaszuba Dec 22 '12 at 8:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.