Ask Your Question
0

Windows puppet cannot copy specific files

asked 2015-07-29 08:59:01 -0500

Goran40 gravatar image

updated 2015-07-29 11:14:44 -0500

GregLarkin gravatar image

if I run this manifest

file {'c:/Java/jdk-8u51-windows-x64.exe':
        source => 'puppet:///modules/java1/jdk-8u51-windows-x64.exe',
        source_permissions => ignore,
        ensure => present,
}

it will say

"Error: /Stage[main]/Java/File[c:/Java/jdk-8u51-windows-x64.exe]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/javaa/jdk-8u51-windows-x64.exe"

But if I replace name of jdk-8u51-windows-x64.exe with agentInstaller.exe ... so that manifest will become:

file {'c:/Java/jdk-8u51-windows-x64.exe':
        source => 'puppet:///modules/java1/agentInstaller.exe',
        source_permissions => ignore,
        ensure => present,
}

... file is copied with name 'jdk-8u51-windows-x64.exe'. I just changed the name of the original file. How is this possible? What is the reason for not copying same file with other name?

edit retag flag offensive close merge delete

Comments

What is the name of the file in the .../modules/java1/files directory on your Puppet master? Is it agentInstaller.exe or jdk-8u51-windows-x64.exe?

GregLarkin gravatar imageGregLarkin ( 2015-07-29 11:15:40 -0500 )edit

While Windows will ignore the source permissions, I would double check your Linux permissions on the Java executable to ensure Puppet can access it. I would set your /modules/java1/jdk-8u51-windows-x64.exe to 644.

johnnyb04 gravatar imagejohnnyb04 ( 2015-07-29 11:36:18 -0500 )edit

jdk-8u51-windows-x64.exe is located in .../modules/java1/. I did not placed it under .../modules/java1/files directory. If I turn jdk-8u51-windows-x64.exe into agentInstaller.exe ("mv jdk-8u51-windows-x64.exe agentInstaller.exe") then manifest is ran and file is copied. same file just name changed

Goran40 gravatar imageGoran40 ( 2015-07-29 14:27:47 -0500 )edit

thanks johnny I will try that as well

Goran40 gravatar imageGoran40 ( 2015-07-29 14:28:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-30 08:55:34 -0500

Goran40 gravatar image

Thanks GregLarkin. That was pretty useful for me as I could not find such indication and I struggled to sort those manifests. Now is working. Thanks

edit flag offensive delete link more

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: 2015-07-29 08:59:01 -0500

Seen: 145 times

Last updated: Jul 30 '15