Closed shoekstra closed 10 years ago
You, sir, are killing it right now! I love seeing so many PRs :)
:) Glad to contribute.
@shoekstra are you testing these on Windows 2k8 or 2012 only?
It's being used against Windows 2008 R2 and Windows 2012 R2.
for some reason, Windows 2k8 isn't working using the latest version of the module when running against a new box. Is that the same behaviour for you?
I'll test it now. How are you applying it and what is the error?
im just applying as follows:
windowsfeature { 'Web-Mgmt-Tools': }
I don't get an error but I don't get the feature installed either
ok, i found the issue. we have the following:
Import-Module ServerManager; if((Get-WindowsFeature ${features} | where InstallState -eq 'Available').count -eq 0){ exit 1 }
it should be
Import-Module ServerManager; if((Get-WindowsFeature ${features} | where { \$.InstallState -eq 'Available'}).count -eq 0){ exit 1 }
That allows us to install the feature BUT it still actually does the 'install' on each puppet run. So working on that part right now
Yep, working on a fix at the moment :) Will commit shortly, just need to test.
ok, this works as expected:
onlyif => "Import-Module ServerManager; if((Get-WindowsFeature ${features} | where { \$_.Installed -match 'True'})){ exit 1 }",
I need to test it on an array of Features though
last thing, my fix above - doesnt work for arrays :( I tried the following declaration:
windowsfeature{'IIS': feature_name => ['Web-Server', 'Web-WebServer', 'Web-ISAPI-Ext', 'Web-ISAPI-Filter', 'Web-Http-Redirect', 'Web-Filtering', 'Web-Mgmt-Console', 'Web-Mgmt-Tools'], }
and I get nothing happening at all
The only thing installed on the box is Web-Mgmt-Tools
Give that a whirl, seems to work on my side.
@shoekstra this works perfectly - nice job
Hello,
This adds support for -IncludeManagementTools and -IncludeAllSubFeature when adding new features. Can't think how to make it add sub features or management tools after a feature is already present so have added a known issues note to the README.
Cheers, Stephen