Ask Your Question
0

puppet with apache previously installed from source

asked 2014-08-26 01:50:37 -0500

Hi All,

We are managing LAMP servers where Apache has been installed from source and thus its files are not placed in usual OS based default locations.

Now, to automate with puppet, I have downloaded the apache module from forge and configured params according to my existing environment. Now I have two issues:

  1. the module assumes that apache was installed as a package thus some of the code might not be running when I apply the module on a node. e.g. require => Package['httpd'].

  2. module tries to restart httpd service, while we are running httpd as a process by explicitly running "http -k start|stop" command after each config change.

How to change two of the above mentioned behaviours of default apache module to suit my requirement?

thanks and regards, kaushik

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-26 12:19:44 -0500

WhatsARanjit gravatar image

The puppetlabs/apache module only support certain operating systems and assumes the underlying providers of that OS. In other words, on a RedHat family, it uses yum; on a Debian family, it uses apt; etc. You are able to supply your own Apache, but you'll have to compile it and package it into a native package type. In order to restart the service, the module also assumes the native provide for service management, often /sbin/service. However, in order to modify items already in the catalog, use the following notation:

Service [ 'httpd' ] {
  start => $my_start_command,
  stop  => $my_stop_command,
}
Package [ 'httpd '] {
  provider => $another_provider,
  source   => $my_location,
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-26 01:47:54 -0500

Seen: 20 times

Last updated: Aug 26 '14