--
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.
For more options, visit https://groups.google.com/d/optout.
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.
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?
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 accountAnd, 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/94f5a2c0-5eae-427d-b77f-4ec7dbef0dcc%40googlegroups.com.
Yep, a custom fact. In case someone else happens upon this looking for a similar answer, here's my custom fact to override Facter's default path fact:Facter.add('path') doconfine :kernel => 'windows'setcode domy_fact = Facter::Util::Resolution.exec('C:\Windows\system32\cmd.exe /C "reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path""')my_fact.rpartition('REG_EXPAND_SZ').slice(2).stripendendThanks Rob !
On Thursday, July 17, 2014 3:37:03 PM UTC-4, Jim Richard 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?
--
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/a244e99f-3c11-4052-a0d4-f491089a1764%40googlegroups.com.