Ask Your Question
0

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not get metadata [closed]

asked 2018-11-13 03:25:10 -0600

ThatGuyAUS gravatar image

updated 2018-11-13 08:55:22 -0600

DarylW gravatar image

please bare with me.

I am using puppet 2019.

I am trying to copy a ps1 script from a module on the puppet server to a destination across my nodes. its a simple nagios plugin script that is like any other powershell script.

I keep receiving this error when it attempts to copy the file:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not get metadata
for puppet:///modules/aitcheckmk/files/checkserver_compliance.ps1

the file is present on the puppet server, and the destination path is correct.

  file { 'c:\program files (x86)\check_mk\local\checkserver_compliance.ps1':
    ensure             => file,
    source             => 'puppet:///modules/aitcheckmk/files/checkserver_compliance.ps1',
    source_permissions => 'ignore',
  }
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ThatGuyAUS
close date 2018-11-20 06:13:12.493201

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-11-18 09:30:22 -0600

The source attributes do not require "files" to be in the path. Puppet automatically knows about the files directory so by putting files in the path, Puppet thinks there is a <modulename>/files/files/checkserver_compliance.ps1 instead. This is also true for the templates directory using the content attribute.

edit flag offensive delete link more

Comments

Thanks @Puppet Pirate, I removed "files" and it is now copying down the file as expected

ThatGuyAUS gravatar imageThatGuyAUS ( 2018-11-20 06:12:12 -0600 )edit
0

answered 2018-11-16 03:11:12 -0600

Geoff gravatar image

Try:

source => 'puppet:///modules/aitcheckmk/checkserver_compliance.ps1',

Although you put files in a directory called files, puppet will automatically mount a module's file directory at puppet:///modules/nameofmodule for you, so including files in paths starting puppet:/// is an error.

edit flag offensive delete link more

Comments

Thanks @Geoff, I removed "files" and it is now copying down the file as expected

ThatGuyAUS gravatar imageThatGuyAUS ( 2018-11-20 06:12:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-11-13 03:25:10 -0600

Seen: 163 times

Last updated: Nov 18