Search code examples
chef-infraknife

knife environment from file changes filename


I am trying to upload a chef environment using the knife command but it changes the filename and I am not sure why. Can someone please suggest a solution?

[centos@ip-10-$$$-***-6 .chef]$ knife environment  from file /home/centos/jenkins-do-not-delete/workspace/chef-repo/generateEnvironmentfromTemplate/GIT/InfaEnvJsonGenerator/InfaEnvJsonGenerator/chefOutput/Merged/Release-Azure-R35-pod1-services.json
Updated Environment Release-Azure-R35-pod-services

If you see carefully, my file name is Release-Azure-R35-pod1-services.json

but it was changed to Release-Azure-R35-pod-services.json

The numeric 1 was removed from pod1


Solution

  • The file name has no relevance. The environment name is the value of the name parameter within the Release-Azure-R35-pod1-services.json file.