Ask Your Question
1

Windows: file visible via puppet command prompt but not regular command prompt

asked 2014-02-14 17:47:49 -0600

anthv123 gravatar image

updated 2014-02-14 17:50:31 -0600

I am trying to deploy files to windows machines. After I run puppet agent via the 'Start Command Prompt with Puppet,' the files are shown if I do a 'dir' on the directory I am expecting them. However, the files are NOT visible through the file explorer or a regular command prompt (even when running as Administrator).

What am I doing wrong?

Here is my manifest:

file { 'PSWindowsUpdate':
    name               => "C:/Windows/System32/WindowsPowerShell/v1.0/Modules/PSWindowsUpdate",
    path               => "C:/Windows/System32/WindowsPowerShell/v1.0/Modules/PSWindowsUpdate",
    ensure             => present,
    source             => 'puppet:///modules/windows_server/PSWindowsUpdate',
    source_permissions => ignore,
    recurse            => true

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-17 23:10:51 -0600

I believe you are seeing a case of File System Redirection. When puppet runs, it runs in 32-bit mode, so it's likely you can't find the files due to Windows automatically remapping c:\windows\system32 to c:\windows\syswow64, meaning your files are likely located at C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate.

If you would like your files to go where you want, look at c:/windows/sysnative/WindowsPowerShell/v1.0/Modules/PSWindowsUpdate. SysNative allows you to force it to use the actual System32 directory.

Take a look at http://msdn.microsoft.com/en-us/library/windows ... (more)

edit flag offensive delete link more

Comments

You will not run into this issue with the newer 3.7.x+ Puppet 64bit agents.

rob gravatar imagerob ( 2014-10-03 22:55:28 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-02-14 17:47:49 -0600

Seen: 184 times

Last updated: Feb 17 '14