Last active
December 29, 2015 13:39
-
-
Save grenade/7678956 to your computer and use it in GitHub Desktop.
Just playing with ideas from http://technet.microsoft.com/en-us/library/dn249925.aspx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $AllNodes = @( | |
| @{ | |
| NodeName = "*"; | |
| RecurseValue = $true | |
| }, | |
| @{ | |
| NodeName = "WebServer101"; | |
| Role = "Web"; | |
| RolesToBePresent = "Web-Server"; | |
| SourceRoot = "\\Server106\source\web"; | |
| Version = "1.0"; | |
| WebDirectory = "D:\inetpub\wwwroot"; | |
| RecurseValue = $false; | |
| }, | |
| @{ | |
| NodeName = "AppServer102"; | |
| Role = "NServiceBus"; | |
| RolesToBePresent = "MSMQ-Server"; | |
| SourceRoot = "\\Server106\source\app"; | |
| Version = "1.0"; | |
| AppDirectory = "D:\Services"; | |
| RecurseValue = $false; | |
| } | |
| ); | |
| Configuration appEnvironment { | |
| Node $AllNodes.Where("Role -eq Web").NodeName { | |
| WindowsFeature webServer { | |
| Ensure = "Present"; | |
| Name = $Node.RolesToBePresent | |
| } | |
| } | |
| Node $AllNodes.Where("Role -eq NServiceBus").NodeName { | |
| WindowsFeature msmqServer { | |
| Ensure = "Present" | |
| Name = $Node.RolesToBePresent | |
| DependsOn = "[WindowsFeature]msmqDirectory", "[WindowsFeature]msmqTriggers", "[WindowsFeature]msmqHttpSupport", "[WindowsFeature]msmqMulticasting", "[WindowsFeature]msmqRouting", "[WindowsFeature]msmqDcom" | |
| } | |
| WindowsFeature msmqDirectory { | |
| Ensure = "Absent" | |
| Name = "MSMQ-Directory" | |
| } | |
| WindowsFeature msmqTriggers { | |
| Ensure = "Absent" | |
| Name = "MSMQ-Triggers" | |
| } | |
| WindowsFeature msmqHttpSupport { | |
| Ensure = "Absent" | |
| Name = "MSMQ-HTTP-Support" | |
| } | |
| WindowsFeature msmqMulticasting { | |
| Ensure = "Absent" | |
| Name = "MSMQ-Multicasting" | |
| } | |
| WindowsFeature msmqRouting { | |
| Ensure = "Absent" | |
| Name = "MSMQ-Routing" | |
| } | |
| WindowsFeature msmqDcom { | |
| Ensure = "Absent" | |
| Name = "MSMQ-DCOM" | |
| } | |
| } | |
| } | |
| appEnvironment –ConfigurationData $AllNodes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment