On Monday, May 15, 2017 at 8:16:38 AM UTC-4, R.I. Pienaar wrote:
>
>
> debian will not overwrite configs on package install - suggest you put a 
> config down that does what you want first. 
>

Or, I dunno, maybe he could could tie the service to the config file, and 
restart apache when the config file changes, and "require" the apache2 
class as part of his nginx setup.

So Puppet would install apache (starting the service), install the config 
file (restarting apache), and then install nginx.

class apache2  {

  $pkglist = ['apache2', 'apache2-dev', .... ]

  package { $pkglist:
     ensure   => latest,
     alias    => 'apache2'
  }
  file { '/etc/apache2/conf.d/ports.conf':
    content => 'Listen 127.0.0.1:80',
    require => Package['apache2'],
    notify  => Service['apache2']
  }
  service { 'apache2':
    ensure      => running,
    refreshonly => true
  } 
}

class nginx  {

  require apache2

  package { ... } 

  service { ... }

}

That's just off the top of my head, and isn't really The Right Way, but 
it's got all the components.
 

> Debian is just by design stupid, thinks starting all services 
> unconfigured on install is a good idea, suggest you use a OS designed to 
> be used on servers and not peoples basements. 
>

That is probably the single worst piece of advice I've seen on this forum. 
 It's hostile, short-sighted, and not terribly useful.

Debian has been a better "server" OS for years, in that it supports 
in-place upgrades, and makes it easier to control which packages are 
installed from which repositories.

Our environment has about 200 web and database servers, about 60% of which 
are Red Hat, and the rest are Debian.  They're both perfectly good 
operating systems for production servers, but they do require the admin be 
open-minded enough to actually learn the differences between the two 
paradigms-- otherwise, you might as well run Windows.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a3979ccc-0761-4a26-8a3d-26d38ff7f6bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to