Running `azurerm server create` with Chef Environment argument does not correctly assign environment to the created node
Closed this issue · 2 comments
Using command-line arguments -E
, --environment
, -r
, or --run-list
seems to have no effect on the newly provisioned node when using these with the azurerm server create
command. No matter what gets passed in, the new node gets provisioned successfully as a client of the chef-server but has a default environment of _default
and an empty run list until manually set through further Chef commands.
Here is an example of the full command run that assigns the empty enviornment and run list instead of the expected Chef environment of development_environment
and app
role.
azurerm server create --azure-resource-group-name development --azure-vm-name test-deploy --azure-service-location 'eastus' --azure-image-os-type ubuntu --azure-image-reference-sku '14.04.2-LTS' --ssh-user testuser --ssh-public-key mypub.pub --azure-vm-size Small --azure-vnet-name default-vnet --azure-vnet-subnet-name default_subnet -r "role[app]" -E development_environment -c .chef/knife.rb
@SimonKaluza I have reproduced issue with above commands but found that only Chef environment
is not being set. It is _default
instead of development_environment
. Run list
is same as we provide in command.
We will work on to fix for environment
@dheerajd-msys yes I see the Run List being set on my end now too when I upgraded to version 1.7 of the gem, my mistake! Looking forward to the environment fix 👍