-
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
Install all modules before adding custom configs #1221
Install all modules before adding custom configs #1221
Conversation
|
There is no reason for having |
|
@DavidS I don't do this. I just do and the module does the rest. The problem is that at the time it does this (and runs the config test, also a feature internal to the module) the Apache modules are not installed yet. I don't think this issue should be closed yet, could you please re-open it? |
|
Sorry, I missed that part. I'll have another look. |
|
The main problem with your proposed solution would be that the collector This will kill any configuration relying on virtual apache::mod resources. I've spelunked a bit through the code and I think the best bet is to try to connect the mod packages from https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/mod.pp#L70 directly to the verification exec (https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/custom_config.pp#L52), probably best done using a tag. If you are in there, please also rename that exec to |
|
Not sure I get you right. We should connect not only the package (https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/mod.pp#L70) as it might not even be installed. We need something to refer to the ::apache::mod as a whole. Any could you please give me an example how you would use a tag here? |
249f698
to
f0f461a
Compare
|
@DavidS What about the current solution with a shared anchor? Do you think this might work? |
|
This looks like a very nice idea! If you could just squash/rebase it into a single commit, please? |
d3be1a8
to
13b44ff
Compare
|
Done. It also passed a quick check and provisioned a machine correctly. But of course, that might also be resource ordering luck 😄 . |
|
If jenkins goes green, I'll merge it. You are in the best position to judge whether it solves your problem. I like the change and I'd be stupid to try to second guess you :-) |
|
Then, as a German, I'll go and port https://github.com/hmlb/phpunit-vw to Puppet. |
|
:-D |
|
Too bad. I hate those tests that fail when you change a natural language string printed to the user. |
|
I've yet to find a better way to ascertain that the right error is thrown :-/ |
The problem is that we have defines (apache::custom_config and apache::mod) on both sides so we cannot easily reference the one side from the other (when we want to avoid the <||> syntax). So, we use an anchor as the reference point and make things happen before or after that.
13b44ff
to
9d8efec
Compare
Install all modules before adding custom configs
|
Danke, daß Du Dir die Mühe gemacht hast das ordentlich umzusetzen! |
|
Vielen Dank für Deine schnelle Reaktion und den Merge :) |
When setting up a new machine from scratch and adding some
::apache::custom_configs, I see these:What happens is that I have already put some custom virtual host in place that requires some module (e.g. mod_rewrite). Then, a
custom_configis applied and triggers the config test. That test fails because the module (required by the virtual host) is not yet in place.