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

link|improve this question
feedback

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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