Closed rychannel closed 7 years ago
I am seeing similar behavior in 2008 R2 where it does install the Windows Features but does not recognize they are installed on subsequent runs:
Notice: /Stage[main]/Fsscheduler::Base/Windowsfeature[Application-Server]/ensure
: created
Notice: /Stage[main]/Fsscheduler::Base/Windowsfeature[AS-NET-Framework]/ensure:
created
Notice: /Stage[main]/Fsscheduler::Base/Windowsfeature[AS-Web-Support]/ensure: cr
eated
Notice: /Stage[main]/Fsscheduler::Base/Windowsfeature[AS-WAS-Support]/ensure: cr
eated
Notice: /Stage[main]/Fsscheduler::Base/Windowsfeature[AS-HTTP-Activation]/ensure
: created
Notice: /Stage[main]/Fsscheduler::Base/Windowsfeature[Web-Server]/ensure: create
d
Notice: /Stage[main]/Fsscheduler::Base/Windowsfeature[Web-Mgmt-Tools]/ensure: cr
eated
Notice: Finished catalog run in 36.83 seconds
My issue went away in version 2.1.0 of the module.
Reopening... here are error messages...
Error: /Stage[main]/Profiles::Iis/Windowsfeature[NET-Framework-Core]/ensure: change from absent to present failed: Execution of 'C:\Windows\system32\WindowsPowershell\v1.0\powershell.exe Install-WindowsFeature NET-Framework-Core' returned 1: Install-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f
At line:1 char:1
+ Install-WindowsFeature NET-Framework-Core
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
Exception
+ FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind
owsFeatureCommand
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
False No Failed {}
here is the code
windowsfeature { 'NET-Framework-Core': ensure => 'present', source => $feature_source, }
Wait, maybe this is a perms issue on my side... looking in to it more
I think this is an issue related to source files and not Puppet or this module. Closing issue. If I learn any differently, I'll reopen
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Run puppet agent. Assign code that attempts to install a windows feature
What are you seeing
Puppet run shows that each feature was installed successfully. When puppet is run again, it says everything installed successfully.
What behaviour did you expect instead
install succesfully and not show up on subsequent runs
Output log
[mNotice: Local environment: 'production' doesn't match server specified node environment 'test', switching agent to 'test'.[0m [0;32mInfo: Retrieving pluginfacts[0m [0;32mInfo: Retrieving plugin[0m [0;32mInfo: Loading facts[0m [0;32mInfo: Caching catalog for tst-box-as-3.hoad.local[0m [0;32mInfo: Applying configuration version '1481319198'[0m [mNotice: /Stage[main]/Profiles::Java::Jre8u111x64/Package[Java 8 Update 111]/ensure: created[0m [mNotice: /Stage[main]/Profiles::Base::Applications/Windowsfeature[Telnet-Server]/Exec[remove-feature-Telnet-Server]/returns: executed successfully[0m [mNotice: /Stage[main]/Profiles::Base::Applications/Windowsfeature[PowerShell-ISE]/Exec[add-feature-PowerShell-ISE]/returns: executed successfully[0m [mNotice: /Stage[main]/Profiles::Iis/Windowsfeature[IIS]/Exec[add-feature-IIS]/returns: executed successfully[0m [mNotice: /Stage[main]/Profiles::Iis/Windowsfeature[Net-Framework]/Exec[add-feature-Net-Framework]/returns: executed successfully[0m [mNotice: /Stage[main]/Profiles::Iis/Windowsfeature[Net-Framework-45]/Exec[add-feature-Net-Framework-45]/returns: executed successfully[0m [mNotice: Applied catalog in 27.87 seconds[0m
Any additional information you'd like to impart