Chef

env provider

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.8.16
  • Fix Version/s: 0.9.0
  • Component/s: Providers
  • Labels:
    None
  • Environment:

    Windows (for now)

  • Triage Status:
    Triaged

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

Activity

Hide
Doug MacEachern added a comment - 18/May/10 4:42 AM
Show
Doug MacEachern added a comment - 18/May/10 4:42 AM Available at: http://github.com/dougm/chef/tree/CHEF-1228
Hide
Daniel DeLeo added a comment - 02/Jun/10 5:05 AM

Awesome work Doug, thank you. This is merged and will be pushed momentarily.

  • Dan DeLeo
Show
Daniel DeLeo added a comment - 02/Jun/10 5:05 AM Awesome work Doug, thank you. This is merged and will be pushed momentarily.
  • Dan DeLeo
Hide
Daniel DeLeo added a comment - 30/Jul/10 7:22 PM

just removing 0.9.8 from the fix version, dunno how it got in there.

Show
Daniel DeLeo added a comment - 30/Jul/10 7:22 PM just removing 0.9.8 from the fix version, dunno how it got in there.
Hide
Daniel DeLeo added a comment - 30/Jul/10 7:23 PM

was already fixed, but somehow 0.9.8 got added as a fix version.

Show
Daniel DeLeo added a comment - 30/Jul/10 7:23 PM was already fixed, but somehow 0.9.8 got added as a fix version.

People

Vote (0)
Watch (0)

Dates

  • Created:
    18/May/10 4:27 AM
    Updated:
    30/Jul/10 7:23 PM
    Resolved:
    30/Jul/10 7:23 PM