1

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

bayou
  • 33
  • 3

1 Answers1

5

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.

EEAA
  • 109,363
  • 18
  • 175
  • 245