DscWorkshop
DscWorkshop copied to clipboard
How to apply multiple roles to a node?
Hello there,
it is possible to apply multiple roles to one node? Like:
NodeName: '[x={ $Node.Name }=]'
Environment: '[x={ $File.Directory.BaseName } =]'
Role:
- WebServer
- FileServer
If i try so, the "Describing Node Definition Files" test fails with [-] Role of 'DSCWeb02' is 'WebServer FileServer' and does exist 28ms (26ms|2ms) at $node.Role -in $Roles | Should -BeTrue, H:\Code\DscWorkshop\tests\ConfigData\ConfigData.Tests.ps1:176
Hello and sorry for the late reply. No, with the setup we have in the standard blueprint, a node can only have one role assigned to it.
@stehlih, did you have nodes in your setup that have multiple roles?
Hi, I have a scenario like this: in a production environment, I have two separate servers performing different tasks (I was thinking of defining two different roles), but in the test environment, everything collapsed onto a single node... How can I represent such a situation since multiple roles are not supported? Thank you for any suggestions!