Skip to content
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

Merged
merged 4 commits into from
Jun 5, 2013
Merged

Add $conf_template in order to override the default template. #200

merged 4 commits into from
Jun 5, 2013

Conversation

apenney
Copy link
Contributor

@apenney apenney commented May 16, 2013

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.

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.
@justicel
Copy link

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).

@hunner
Copy link
Contributor

hunner commented May 24, 2013

Okay! Could you also update the documentation for this parameter, and rspec-puppet tests as well? Thanks @apenney !

@apenney
Copy link
Contributor Author

apenney commented May 24, 2013

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.

@apenney
Copy link
Contributor Author

apenney commented May 24, 2013

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.

@apenney
Copy link
Contributor Author

apenney commented May 24, 2013

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.

apenney added 2 commits May 24, 2013 11:22
…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.
@hunner hunner mentioned this pull request Jun 5, 2013
@hunner hunner merged commit f4ca555 into puppetlabs:master Jun 5, 2013
traylenator pushed a commit to traylenator/puppetlabs-apache that referenced this pull request Jun 7, 2022
…run-flags

Use line breaks and continuation for run flags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants