On Fri, Jul 18, 2014 at 8:36 AM, Jim Richard <jimr6...@gmail.com> wrote:

> Thanks for the quick reply Rob.
>
> I went ahead and spun up a new Server2008R2 virtual machine to test a very
> basic install:
>
> grabbed the iso from
> http://www.microsoft.com/en-us/download/details.aspx?id=11093
> installed Windows as usual, did the Windows update dance reboot, reboot,
> etc
> got the puppet agent from https://downloads.puppetlabs.com/windows/,
> I tried the most recent agent version and even the oldest, 2.7 version,
> both the same
> I also tried installing to the Administrator account as well as installing
> to another account
>
> And, I saw the same behavior.
>
> I tried echo %PATH% and then environment.bat and that did give a clue. I
> ran environment.bat multiple times and each time the Path var in the Puppet
> shell grows. I've attached a screen shot so you can see what I mean.
>
> So, it looks like the Puppet shell initialization process executes
> environment.bat twice; that happens for scheduled agent runs as well.
>
This is probably because puppet.bat and facter.bat both call it. :(



> If I just wanted Facter to report back the "true" system Path, minus all
> of the puppet shell added stuff, what would you suggest. Pull it from the
> registry? Or via a custom fact, take what Facter reports and chop off all
> of the extra Puppet shell applied stuff with a regex?
>
>
>
> <https://lh3.googleusercontent.com/-1qTwaiZxz0s/U8k9oPOJYXI/AAAAAAAAB-k/YXycPbeOk9o/s1600/Screen+Shot+2014-07-18+at+11.26.54+AM.png>
>
>
>
Perhaps a custom fact?



>
>
>
>
> On Thursday, July 17, 2014 6:12:26 PM UTC-4, Rob Reynolds wrote:
>>
>>
>> On Thu, Jul 17, 2014 at 2:37 PM, Jim Richard <jimr...@gmail.com> wrote:
>>
>>> Facter on a Windows 2008R2 server is doing something weird. Version of
>>> facter is 2.0.2.
>>>
>>> If I, from the Puppet command prompt, do a "echo %Path%", I see exactly
>>> what I expect. But if I say "facter Path", it shows me all of the Puppet
>>> added path stuff twice, ie. the output is almost twice as much text.
>>>
>>> Oddly, the original pre: puppet agent install path data is still
>>> reported by facter, correctly, not doubled up, but all of the path items
>>> added by the puppet agent install process show up twice when I issue a
>>> "facter Path".
>>>
>>> My "real" path:
>>>
>>> E:\oracle\product\11.2.0\db_1\bin;%SystemRoot%\system32;%
>>> SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\
>>> System32\WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\
>>> 11.2.0\db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE
>>>
>>
>>> What facter thinks is my Path:
>>>
>>> C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files
>>> (x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet
>>> Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet
>>> Labs\Puppet\bin;C:\Program Files (x86)\Puppet 
>>> Labs\Puppet\sys\ruby\bin;C:\Program
>>> Files (x86)\Puppet Labs\Puppet\sys\tools\bin;C:\Program Files
>>> (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet
>>> Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet
>>> Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet
>>> Labs\Puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin;C:\
>>> ProgramFiles(x86)\PuppetLabs\Puppet\sys\tools\bin;E:\
>>> oracle\product\11.2.0\db_1\bin;C:\Windows\system32;C:\
>>> Windows;C:\Windows\System32\Wbem;C:\Windows\System32\
>>> WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\11.2.0\
>>> db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE
>>>
>>>
>>> Any ideas what might cause this?
>>>
>>
>> Note the first thing that facter.bat / puppet.bat runs is a call to
>> environment.bat, which ensures that the console has all of the right
>> environment variables set and it updates PATH as well.
>>
>> Why it is doubling up is another issue entirely.
>>
>> Try this - open a command line and call:
>> echo %PATH%
>> environment.bat
>> echo %PATH%
>>
>> Oddly enough, I don't see  C:\Program Files (x86)\Puppet Labs\Puppet\bin
>> in your original path as I might expect to see.
>>
>> How did you install facter on your Windows system?
>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users...@googlegroups.com.
>>>
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/puppet-users/97685237-6523-40a3-81ad-38f98df86593%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/puppet-users/97685237-6523-40a3-81ad-38f98df86593%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Rob Reynolds
>> Developer, Puppet Labs
>>
>> *Join us at PuppetConf 2014 <http://www.puppetconf.com/>, September
>> 20-24 in San Francisco*
>> *Register by July 31st to take advantage of the Early Bird discount
>> <https://puppetconf2014.eventbrite.com/?discount=EarlyBird> **--**save
>> $249!*
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/94f5a2c0-5eae-427d-b77f-4ec7dbef0dcc%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/94f5a2c0-5eae-427d-b77f-4ec7dbef0dcc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Rob Reynolds
Developer, Puppet Labs

*Join us at PuppetConf 2014 <http://www.puppetconf.com/>, September
20-24 in San Francisco*
*Register by July 31st to take advantage of the Early Bird discount
<https://puppetconf2014.eventbrite.com/?discount=EarlyBird> **--**save $249!*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMJiBK7ue0692LWBiLLhA%2Ba3m0bHQ9qJ5ypq0gj8v6vJEszzXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to