I’m trying to use the chef supermarket cookbook to install powershell.
.NET version 4.52 is installed on the node.
I run chef-client thusly:
$ chef-client –o “recipe[powershell::powershell4]”
The failure is:
fail ‘Attribute ms_dotnet.v4.version is not configured to install .NET4.5 as required for Powershell4’ if node[‘ms_dotnet’][‘v4’][‘version’] < '4.5’
This error is from line 32 in the powershell4.rb recipe.
Where do you suppose I’m supposed to set the node attribute node[‘ms_dotnet’][‘v4’][‘version’]?
Also posted StackOverflow where I’m also asking for advice. Thanks!
chef-powershell-cookbook-fail-if-nodems-dotnetv4version-4-5-wh
Can’t put the direct link because I’m a new user.
I answered you on StackOverflow already, but the powershell4
recipe appears to be broken. Checking if something is less than a string is not a useful comparison, but you should be able to use https://github.com/chef-cookbooks/ms_dotnet45 to install 4.5 and then set the node attribute in a wrapper cookbook or role.
The PowerShell cookbook has a dependency on several other cookbooks, one of which is the ms_dotnet cookbook.
From what I have discovered when you try to run just a recipe that relies on an attribute defined from another cookbook, it will fail in this manner.
If you set this recipe inside a wrapper cookbook that should circumvent that.
From: johnny5isalive [mailto:noreply@chef.discourse.org]
Sent: Friday, January 29, 2016 12:33 PM
To: Brian Whitacre BWhitacre@jackhenry.com
Subject: [chef] Powershell coobook, where to set dotnet node attribute?
The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin.
[https://avatars.discourse.org/v2/letter/j/e56c9b/45.png]
johnny5isalivehttps://discourse.chef.io/users/johnny5isalive
January 29
I’m trying to use the chef supermarket cookbook to install powershell.
.NET version 4.52 is installed on the node.
I run chef-client thusly:
$ chef-client –o "recipe[powershell::powershell4]"
The failure is:
fail 'Attribute ms_dotnet.v4.version is not configured to install .NET4.5 as required for Powershell4' if node['ms_dotnet']['v4']['version'] < '4.5'
This error is from line 32 in the powershell4.rb recipe.
Where do you suppose I'm supposed to set the node attribute node['ms_dotnet']['v4']['version']?
Also posted StackOverflow where I'm also asking for advice. Thanks!
chef-powershell-cookbook-fail-if-nodems-dotnetv4version-4-5-wh
Can't put the direct link because I'm a new user.