[chef] Re: custom json attributes to powershell variables


Chronological Thread 
  • From: Greg Zapp < >
  • To:
  • Subject: [chef] Re: custom json attributes to powershell variables
  • Date: Thu, 5 Jun 2014 01:20:31 +1200

Hi Simon,

Is your difficulty with getting the attributes into Chef or using them once they are there?

-Greg


On Wed, Jun 4, 2014 at 9:36 PM, < " target="_blank"> > wrote:
Hi,

Do you know how I would be able to save JSON custom attributes to a powershell
variable in a recipe?

When I bootstrap a Windows machine I would like to pass the IP, Subnet, GW and
DNS Servers into custom attributes and when the recipe is applied, the windows
machine sets the correct information to the network card (using powershell).

Since knife vsphere doesn't currently support vmware windows customisations I
can't think of another way.

So I would end up with something like this in the recipe (which is a powershell
script):

$ipAddress = customIPAttribute
$gateway = customGWAttribute
etc, within the recipe.

Cheers,
Simon.




Archive powered by MHonArc 2.6.16.

§