-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add $conf_template in order to override the default template. #200
Conversation
apache conf if they really need to. I've seen this requested about three times this week in #puppet alone, so I figured I'd just do it and get a PR up for it so it doesn't get forgotten about again.
Yes please. Removing the template option broke pretty much half of the modules out there and some will require extensive modifications (or just won't be workable at all). |
Okay! Could you also update the documentation for this parameter, and rspec-puppet tests as well? Thanks @apenney ! |
I added an initial draft of the spec tests but I'm unhappy with the implementation. My issue was I couldn't find a clean way with rspec-puppet to mock out a full template. What I wanted to do was something like have a fixtures/templates with a fake template in and test setting conf_template to that and test it works. As I couldn't do that I just reused an existing template in templates/ for the time being but this is absolutely horrible. I'm assuming I'm just missing some easy method to do this tonight so I figured I'd stop here, sleep on it, and try to find a better way to stub out a full template in the morning to clean this up the way I'd like it to work. |
OK, a new attempt at this. It symlinks in a fake template when you run the tests. If I had a clean way to remove it at the end I'd be happier. For now however I think this is better than relying on other files existing. |
OK, I'll stop meddling with this now. I made fixtures/modules/site_apache as a place to test features that people would commonly do with a wrapper module, like passing in your own templates. I like this a lot more than all the alternatives. |
…own the symlinked file at the end of the spec tests, leaving you with a fake.conf.erb in your templates. Still, most people aren't running the tests in the copy they have on their puppetmaster in production so I think this is better than the alternatives.
…se this for testing the template changes. Makes a lot more sense really.
…run-flags Use line breaks and continuation for run flags
In the last few weeks I've seen this come up a few times in #puppet and I wanted to get some minimal changes in to make this viable. This allows you to set the template to a custom file without having to modify the apache module.