Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am very new to Puppet. I just write a code to install software via puppet

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

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

1 Answer 1

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

 
discard

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.