1

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:

https://tickets.puppetlabs.com/browse/MODULES-2916

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

https://forge.puppet.com/puppetlabs/apache/1.4.1#class-apachemodphp

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?

1 Answers1

1

You can use a file resource but without any content data.

For example:

file { '/opt/rh/httpd24/root/etc/httpd/conf.d/rh-php70-php.conf':
  ensure  => file,
  owner   => 'httpd',
  group   => 'httpd',
  mode    => '0644',
  require => Package['rh-php70-php','httpd'],  
}

This will ensure that a file exists at the stated location, but will not change its content. When Puppet runs, it will not remove the file.

Craig Watson
  • 9,575
  • 3
  • 32
  • 47