Information Technology Reference
In-Depth Information
Example 15-1. chef-playground/environments/dev.json
{
"name" : "dev" ,
"description" : "For developers!" ,
"cookbook_versions" : {
"apache" : "= 0.2.0"
},
"json_class" : "Chef::Environment" ,
"chef_type" : "environment"
}
NOTE
There are other options for a version constraint besides “equal to” (=). Equality is the re-
commended practice. To learn more about the other options, refer to http://bit.ly/
abt_cookbook_versions .
Run knife environment from file passing in the dev.json file. knife environment
from file assumes dev.json is located in a subdirectory called environments , and not in the
current directory:
$ knife environment from file dev.json
Updated Environment dev
Run knife environment show dev as follows to display the details about the dev environ-
ment:
$ knife environment show dev
chef_type: environment
cookbook_versions:
apache: = 0.2.0
default_attributes:
description: For developers!
json_class: Chef::Environment
name: dev
override_attributes:
Search WWH ::




Custom Search