Detect User Logged in when running Puppet on Windows
I am trying to set a nuget configuration for every windows developer machine and i need to access the Windows C:\Users\<username> in order to navigate to the file that i want to manage with puppet.
Now since puppet runs under the SYSTEM account i would like to know if it can be possible to retrieve the username (currently logged in) in other to use it as a FACT variable.
When I try it shows me system user rather than the actual user.
Facter.add("user_name") do confine :kernel => "Windows" setcode do Facter::Util::Resolution.exec('c:\Windows ...