Knife role not working


#1

When trying to assign role through below command from Windows Workstation then it is not assigning the role and coming as shown below, the same command was working previously.

PS> knife role list
x
y
z
PS C:\chef-repo>
PS C:\chef-repo>
PS C:\chef-repo> knife node run_list set abcd.com “role[y]”
abcd.com:
run_list: recipe[roles]
PS C:\chef-repo>


#2

There’s not much to go on here. If you run knife with the verbose output flag (-V), does that give you anymore information? Does changing the role via the the Chef manage site work (if you have it setup)?


#3

yeah that would work from chef manage gui but i need to do it from workstation because i don’t have access of chef manage.


#4

The same command is working on linux workstation but not working on windows workstation …


#5

You’re running into some long-running windows powershell/cmd prompt
parsing/globbing issues.

Here’s the github issue with more details on the subject:

TL;DR: wrap in triple single quotes in powershell or single quotes in cmd
prompt.