[PUP-3688] Allow path environment to be specified on a per-resource basis Created: 2014/11/21  Updated: 2017/05/18  Resolved: 2017/05/15

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Normal
Reporter: redmine.exporter Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: redmine
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PUP-6134 Unable to install a Ruby gem to non-P... Resolved
relates to PUP-2730 source attribute not honored for gem ... Closed
relates to PUP-6488 Gem provider should allow alternative... Resolved
Template:

 Description   

Currently, only the exec resource type permits the path to be specified for commands it executes. However, it would be generally useful for other resource types. For example, to specify the path to use when executing package commands (that are relative).

The only workaround is to modify the provider source or to use the <http://docs.puppetlabs.com/references/latest/configuration.html#path> setting, though that is global, and won't work in cases where a module installs a package in a location that isn't already in the path, e.g. Java applications on windows.

Original description:

Hi,

I just installed ruby1.9.3.exe package on a windows build server and also i was thinking on installing some gems. It seems that is installing the gems as part as as the 1.8.7 ruby version shipped with the Puppet Client windows installer.

class ruby{
 
file {'ruby':
	name => 'C:\Temp\rubyinstaller-1.9.3-p194.exe',
	ensure => present,
	source => 'V:\shardata\Puppet\rubyinstaller-1.9.3-p194.exe'
}
 
 
exec { 'ruby':
		command => 'C:\Temp\rubyinstaller-1.9.3-p194.exe /verysilent /dir="C:\ruby" /tasks="assocfiles,modpath"',
		require => File["ruby"]
	}
	
	
# package { 'nokogiri':
	# ensure => '1.5.5',
	# provider => 'gem',
	# require => Exec['ruby']
# } 

Should I still use the gem provider or should i use the exec and map the new ruby package gem.bat path?



 Comments   
Comment by Eric Delaney [ 2017/05/15 ]

Thank you for filing this issue. However, we believe this change represents a technical direction that we have decided not to follow in Puppet. As such, we are closing this as “Won’t Do”. If any watcher believes this is an error, please add a comment explaining.

Generated at Wed Nov 13 17:57:39 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.