Details
Description
The env provider can create, modify and delete system environment variables.
On Windows platforms this means we can automate the tedious manual task of:
Start -> Computer -> Properties -> Advanced System Settings -> Environment Variables
It is common for Windows services to depend on system environment variables,
not sure if this would be considered as useful on Unix platforms.
Some examples:
#create or modify JAVA_HOME env "JAVA_HOME" do action :create value "C:\\jdk1.6" end #add %JAVA_HOME% to PATH env "PATH" do action :modify delim File::PATH_SEPARATOR value "%JAVA_HOME%\\bin" end #delete "C:/foo/bin" from PATH env "PATH" do action :delete delim File::PATH_SEPARATOR value "C:/foo/bin" end
Available at: http://github.com/dougm/chef/tree/CHEF-1228