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 am very new to Puppet. I just write a code to install software via puppet

node '' {
   include ntp
   include apache
    apache::vhost { '':
      port =>8080,
      docroot => '/var/www/',
      ssl => false,
      priority => 10,
      serveraliases => '',

When the above code applied, should I remove it in order not to double-install in the next time ?

Any suggestion would be appreciated

share|improve this question
up vote 5 down vote accepted

Puppet uses a declarative language, not an instructive one. You are telling Puppet how you want the system to look, and then trusting that Puppet will do the right thing to put the system's state into compliance with your manifest(s).

in your "apache" class, if you're using the standard method to install apache:

package { "apache":
    ensure => "installed"

...then you don't need to worry about it installing twice.

share|improve this answer

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.