Ask Your Question
0

How do I run a Puppet Manifest on a Windows server with Puppet Agent?

asked 2016-02-22 18:18:57 -0500

Conventional gravatar image

I have done it in the past. I don't know why I cannot do it this way below. I am using CentOS 7 for the Puppet Master server. I am using Windows Server 2012 with Puppet Agent.

All the content below was taken from the Puppet Master server. Here is site.pp (which is in /etc/puppet/manifests):

node 'fqdnOfWindowsServer' { import 'good.pp'}

node 'fqdnOfLinuxServer' {}

Here is good.pp (which is in /etc/puppet/manifests):

file { 'c:/fun.ps1':
      ensure => 'present',
      source => '/tmp/special.ps1',
      source_permissions => 'ignore',
}

Here is what happens when I run puppet agent -t:

...Caching catalog for fqdnOfLinuxServer... Error: Failed to apply catalog: Parameter path failed on File[c:/fun.ps1]: File paths must be fully qualified, not 'c:/fun.ps1' at /etc/puppet/manifests/good.pp:5

How do I input a fully qualified path? It seems to be having a problem with a Windows server as the Puppet Agent. Paths are different from Linux Puppet Agents.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-09 13:36:34 -0500

joshc gravatar image

Caching catalog for fqdnOfLinuxServer... Error: Failed to apply catalog: Parameter path failed

This means you're running the agent on the linux server, and for some reason the file resource is added to the linux agent's catalog. The error message occurs because the file path c:/fun.ps1 is not an absolute POSIX path.

But the real issue is that the file resource should only be included in catalogs for Windows agents. It may be related to the use of importwhich is deprecated in Puppet: https://docs.puppet.com/puppet/3.8/re....

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: 2016-02-22 18:18:57 -0500

Seen: 329 times

Last updated: May 09 '16