-1

I've installed Foreman and Puppet on test VM and also installed test VM with puppet-agent and apache. I've created micro manifest with apache module and primitive apache config. It's working. But, I don't exactly understand how to implement configuration management storing configs files in GIT repository. I want to store in GIT all configs files from apache, and when someone will edit config manually - puppet makes rollback from original config from repository. So, how to implement this scheme?

Many thanks.

mikonoid
  • 25
  • 2
  • 7

1 Answers1

0

You have two primary options.

1. Allow Puppet to Manage all the things

The first option is to decide that edits should never be performed on the server and should only be done in the git repo that controls the puppet module for Apache (Infrastructure as Code). You would update the configuration file in the module repo and then deploy the module on your puppet master/Foreman. This is the basic Puppet package/file/service configuration management that it was built to do and will keep you from having to access the VM/machine running Apache.

2. Create git repo for Apache dir

The second option is to just turn your apache dir into a git repo and completely manage it from the server without puppet (or only allow puppet to control the service to ensure => running). This option forces you to access the server and check from time to time if an update was made.