Belay my comment about validate_re. It's in the stdlib module. For some 
reason the last time I googled it I didn't find anything.

If anyone has any bright ideas re getting around the reboot problem I'm all 
ears.


On Monday, August 20, 2012 1:43:26 PM UTC-5, Jeff Sussna wrote:
>
> OK, I got registry::value working by commenting out the calls to 
> validate_re. I will file a ticket for that. Unfortunately, though, the 
> Windows gotchas continue. If you manually edit PATH in the System control 
> panel, the new value shows up the next time you open a new cmd window. If, 
> however, you edit it in the registry, the change doesn't show up until you 
> reboot the machine. I've verified this behavior in XP and Server 2003. 
>
> I also discovered an "inconvenience" with the puppet registry module. 
> registry::value calls registry_value, which appends the value to the key to 
> create a namevar. That means you can't edit PATH within a module that has a 
> dependency on another module that edits path; if you do, you get a 
> duplicate declaration error. 
>
> On Friday, August 17, 2012 6:09:50 PM UTC-5, Josh Cooper wrote:
>>
>> On Fri, Aug 17, 2012 at 2:38 PM, Jeff Sussna <j...@ingineering.it> 
>> wrote: 
>> > Hmm..it appears that $::path is returning multiple copies of the Puppet 
>> > paths, along with "/user/bin" (which as you can imagine causes problems 
>> for 
>> > Windows), in addition to the explicitly defined PATH string. Any idea 
>> why? 
>> > 
>>
>> So I get: 
>>
>> C:\work\puppet> envpuppet puppet apply -e "notice($::path)" 
>> notice: Scope(Class[main]): 
>> c:\work\puppet\ext\..\bin;c:\work\puppet\ext\..\..\facter\bin;c:\puppetwinbuilder\sys\ruby\bin;c:\ruby187\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\bin;c:\puppetwinbuilder\sys\git\bin;c:\puppetwinbuilder\sys\git\bin;C:\Chocolatey\bin;c:\work\puppet\ext;/usr/sbin;/sbin
>>  
>>
>>
>> The `:path` setting is populated from the environment, but we also add 
>> in /usr/sbin and /sbin (in defaults.rb), obviously not helpful. Filed 
>> as https://projects.puppetlabs.com/issues/16019. With that said it 
>> shouldn't prevent the exec from working. 
>>
>> You can do something like the following to see how puppet resolves 
>> which cmd.exe to run: 
>>
>> C:\work\puppet>envpuppet irb 
>> irb(main):001:0> require 'puppet' 
>> => true 
>> irb(main):002:0> Puppet::Util.which('cmd.exe') 
>> => "C:/Windows/system32/cmd.exe" 
>>
>> Or is it not finding reg.exe? 
>>
>> Josh 
>>
>> -- 
>> Josh Cooper 
>> Developer, Puppet Labs 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/-Xyg2BLE7NoJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to