-
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 class apache::vhosts to create apache::vhost resources #1450
Conversation
|
@gerhardsam Thank you for your efforts, they are very much appreciated! It would be appreciated if you could give a little context to why this feature would be beneficial to all users. What are the issues related to using the apache::vhost type to obtain the desired functionality? Thanks |
|
With this change you can use the |
|
I agree with @jonnytpuppet here. I'd prefer to keep the current behavior and not overcomplicate the apache class. This is traditionally the model we use in other supported modules, and as mentioned by JT, has a working model for hiera. |
|
@jonnytpuppet Thanks for the feedback and sorry for not answering earlier. @bmjen I do not think that is an overcomplication of the apache class but as an option I could add a class apache::vhosts which would create the apache:vhost resources instead. |
|
@gerhardsam I honestly believe the best way forward is to create a wrapper class in a seperate .pp file that makes a call out to create_resources, then uses the results to call apache::vhost An argument could be made that this should actually fall outside of the module altogether, and should be part of your own environment manifests, however we have president for having a wrapper class inside a module in a separate .pp file, which I'd be willing to merge :) Thanks! |
|
@jonnytpuppet I extracted the creation of the apache::vhost resources in the new class apache::vhosts. Does that conform to your expectation? I am not sure yet, whether to create a separate acceptance test or whether to keep it in spec/acceptance/vhost_spec.rb? |
|
@gerhardsam You still have references to vhosts in the apache class. Shouldn't these be removed now? Thanks |
|
@jonnytpuppet I removed the references in the apache class, added docs and squashed the commits. |
|
@jonnytpuppet Thanks for merging! |
This way it is possible to create apache::vhost resources directly via the main class without declaring them in a separate role or profile.