While working with @Freddy2001 on some issues in the getstarted project we found that changes to /etc/apache2/sites-enabled were being mysteriously un-done. It eventually dawned on my to look at what Puppet roles were applied on the host. This led me to the realization that our role::simplelamp Puppet module is pretty useless for any project that is not using a local puppet master.
Here's what happens:
- role::simplelamp applies ::apache
- ::apache has a set of File resource that control the contents of:
- These File resources include recurse => true and purge => true settings which means that any files under the directory that do not also have Puppet File resources will be removed when Puppet runs.
Effectively this means that unless you apply another Puppet class that declares apache::conf, apache::env, and apache::site resources each Puppet run will undo all changes to the Apache config.
This is pretty annoying behavior for a typical volunteer Labs user. What is happening is non-obvious and non-intuitive. The applied the Puppet role to bootstrap their VM, but very likely are not expecting any manual config changes that they make to disappear twice an hour. We should find a way to make this easier to work with.