Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to apply multiple roles to a node? #151

Open
ghost opened this issue Jan 23, 2023 · 2 comments
Open

How to apply multiple roles to a node? #151

ghost opened this issue Jan 23, 2023 · 2 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jan 23, 2023

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

@raandree raandree self-assigned this Feb 13, 2023
@raandree
Copy link
Contributor

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?

@salem84
Copy link

salem84 commented Jul 9, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants