Foreman installer and existing apache server

Is there a way to run the foreman installer without removing the existing
apache sites and config?

I have looked through the installer options and 'installation scenarios'
and can't see anything that resembles what I'm after.

Regards.

Hey,

that's not the way our installer work, since it is puppet-based.

You can do manual installation, but it's a painful process if you don't
know exactly what you are about to do.

LZ

··· On Tue, Jul 29, 2014 at 03:23:21PM -0700, skramnz wrote: > Is there a way to run the foreman installer without removing the existing > apache sites and config? > > I have looked through the installer options and 'installation scenarios' > and can't see anything that resembles what I'm after. > > Regards. > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,
Lukas #lzap Zapletal

Sorry to dig up an old topic, but I just got nailed on this…as I had
forgotten about it.

Has there been any update to being able to use foreman-installer with
preserving unrelated apache config files in /etc/httpd/conf.d? I am trying
to use an IP vhost to serve repositories and some other static pages
related to Foreman. I have the vhost in a separate config file, but
re-running foreman-installer blows it away.

I know I could stuff those files down in /var/lib/foreman/public (or
whatever it is), but directory indexes are disabled, and I can't seem to
enable them and make that stick either.

··· On Wednesday, July 30, 2014 at 11:53:14 AM UTC-4, Lukas Zapletal wrote: > > Hey, > > that's not the way our installer work, since it is puppet-based. > > You can do manual installation, but it's a painful process if you don't > know *exactly* what you are about to do. > > LZ > > On Tue, Jul 29, 2014 at 03:23:21PM -0700, skramnz wrote: > > Is there a way to run the foreman installer without removing the > existing > > apache sites and config? > > > > I have looked through the installer options and 'installation scenarios' > > and can't see anything that resembles what I'm after. > > > > Regards. > > > > -- > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > -- > Later, > Lukas #lzap Zapletal >

No, our installer assumes Foreman gets the sole use of the box.

If you're running Puppet for the rest of your config management, then
one option is to add the foreman-installer modules to the rest of your
Puppet manifest, and configure them to match the installer. This means
all the vhosts will be in Puppet and the code that deletes unmanaged
files won't touch them.

Greg

··· On Fri, 2017-09-29 at 11:25 -0700, Sean A wrote: > Sorry to dig up an old topic, but I just got nailed on this...as I > had forgotten about it. > > Has there been any update to being able to use foreman-installer with > preserving unrelated apache config files in /etc/httpd/conf.d? I am > trying to use an IP vhost to serve repositories and some other static > pages related to Foreman. I have the vhost in a separate config > file, but re-running foreman-installer blows it away. > > I know I could stuff those files down in /var/lib/foreman/public (or > whatever it is), but directory indexes are disabled, and I can't seem > to enable them and make that stick either.

Is there a way to recover the sites I had installed from somewhere?

I know it is really old topic, but it seems like it just deleted all the existing sites in my apache folder and nothing has changed in past 3 years. You could have just disabled everything, but at least keep sites-available existing in a way.

Also what I find very disappointing is that there is no warning to backup existing apache configs as they will be removed.
With all that I lost 20 different sites configs… Apache still seems to serve them from cache, even though all queries show only information about new configs.
Honestly would just have something to preserve the existing configs when there is deletion without any warnings.

Although this is an old topic, I haven’t found the solution before so sharing how I just solved it today.

After installing foreman-installer, add the following line to /usr/share/foreman-installer/config/foreman.hiera/common.yaml:

apache::purge_config: false

NOTES:

  1. Make a backup of the apache config directory before (re-)running the installer if you have custom configs
  2. As unmanaged configs (eg. your own) can interfere with the workings of foreman, be sure what you are doing
  3. If an update comes by for foreman-installer, you probably need to re-edit the file above.