Allow LCM to accomodate module dependencies that get installed by earlier steps in the configuration
Currently, if you have a configuration that installs a Windows feature then has another step that configures settings using a module that gets installed with that particular feature, the LCM fails its check because that module is not currently present on the node.
For example, we have a configuration that installs the Web-Server role. There are later steps which use the xWebAdministration resource to configure things like Application Pools and Application Pool defaults. The problem is, when the LCM pulls the configuration and runs it's checks, it fails because the xWebAdministration resource uses cmdlets that are present in the WebAdministration module which gets installed with the Web-Server role. Since that role is not installed, the LCM fails saying the WebAdministration module is not present.
Because of this, we need to split our configurations up into 2 and manually apply both. It would be nice if the LCM could use some kind of logic to accommodate for modules that will become available after certain roles are installed or configuration steps are completed.
Thanks for the feedback! This behavior is not by design and is not something I have ever seen before. We will look into it and get back with an answer or more questions.
John Ludlow commented
FWIW, I've seen a similar thing. It seems to be a check before the config runs that everything is in place for it to run. That's obviously a chicken-egg situation because part of the config deploys the resource that makes the config run!
I understand why the check is there, but it would be nice to make it smarter or configurable.
This has been frustrating to work around. Using WMF5 I don't want to work around this by using partial configurations because we don't want to have to resolve conflicts at the node with them (we're using composites). The problem is that even doing DependsOn within our composites we get an error. Hopefully this issue gets some traction!