DscWorkshop icon indicating copy to clipboard operation
DscWorkshop copied to clipboard

How to apply multiple roles to a node?

Open ghost opened this issue 2 years ago • 2 comments
trafficstars

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

ghost avatar Jan 23 '23 19:01 ghost

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?

raandree avatar Feb 13 '23 22:02 raandree

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!

salem84 avatar Jul 09 '23 22:07 salem84