Kiran
Kiran

Reputation: 99

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

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.

Upvotes: 0

Views: 407

Answers (1)

Ali Ganjei
Ali Ganjei

Reputation: 141

From what I can make of the error message, you're trying to create a Windows file resource on a Linux server (the error mentions caching catalog for fqdnOfLinuxServer). If that's the case, the error message makes sense because on Linux, the agent expects file paths to start with a forward slash.

Upvotes: 1

Related Questions