The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Feature #16048

Type and provider for managing windows environment, especially PATH

Added by Josh Cooper over 3 years ago. Updated over 2 years ago.

Status:AcceptedStart date:08/20/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:provider
Target version:-
Affected Puppet version: Branch:
Keywords:windows env environment path

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

The windows system environment is stored in the registry. We should have a type and provider to make it easy to ensure present/absent individual entries.

In particular, PATH is one of the environment variables, which is actually a list of directories, each of which may refer to other environment variables, e.g. %WINDIR%\system32. It is currently difficult to express that a particular entry should be present in the PATH.

The type should allow the complete list of paths to be ensure present, or a set of paths to be added (similar to the inclusive/exclusive behavior of property lists). https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/68ebrAEUzgQ

There’s also the issue of making the system PATH change take affect without rebooting. http://mnaoumov.wordpress.com/2012/07/24/powershell-add-directory-to-environment-path-variable/


Related issues

Duplicated by Puppet - Bug #16997: Allow path environment to be specified on a per-resource ... Accepted

History

#1 Updated by Josh Cooper over 3 years ago

Technique for propagating environment variable changes: http://support.microsoft.com/kb/104011

#3 Updated by Jeff Sussna over 3 years ago

It sounds like the proposed approach won’t have this problem, but need to make sure a copy of the Puppet dirs doesn’t get added to PATH every time it’s updated.

#5 Updated by Josh Cooper over 3 years ago

  • Tracker changed from Bug to Feature

#6 Updated by Eric Badger over 2 years ago

Just stumbled across this ticket and thought I’d make interested folk aware of this module:

https://forge.puppetlabs.com/badgerious/windows_env

Also available in: Atom PDF