Ask Your Question

Apache module with Redhat SCL PHP versions

asked 2018-01-18 06:03:37 -0600

indigoliath gravatar image

updated 2018-01-18 09:47:12 -0600

I use the official Apache module to instal al LAMP on Redhat Linux and use software collections to be able to use a higher PHP version than the RHEL 7 default.

The RHSCL package rh-php70-php places a file to let Apache parse php: /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php70-php.conf

However, Puppet purges this file in the next Puppetrun, as it is not managed by the Puppet Apache module (purge_configs => true).

This is good, however, how can I make an exception for the above mentioned file only, without editing the Apache module itself?

I use this example:

And try to make SCL PHP 5.6 work with the Puppet Apache module like in the docs:

TLDR: I install/manage PHP 5.6 from Redhat SCL through apache::mod::php, however it filebuckets the configs. Do I need to set either a template or a puppet file for these configs to be overruled and not to be filebucketed?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-19 08:22:40 -0600

DarylW gravatar image

You can have puppet 'manage' the file's existence, but not it's contents. If a file is managed by puppet, it won't remove it in the purge.

file: { '/opt/rh/httpd24/root/etc/httpd/conf.d/rh-php70-php.conf': 
  ensure => 'present',
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


Asked: 2018-01-18 06:02:20 -0600

Seen: 182 times

Last updated: Jan 19