yoga sarathi
yoga sarathi

Reputation: 47

Facing issues with File resouce with folder name called "environment" in puppet

I am trying to recursively transfer files from puppet master to my agents with inbuilt fileservers.

I am having folder name called "environment" which is not been transferred to my agents. Instead I am getting the following errors

 Error: Could not set 'file' on ensure: Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}
 Error: Could not set 'file' on ensure: Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}
 Wrapped exception:
 Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}
 Error: /Stage[main]/Platform::Configuration::Test1/File[/opt/pe-platform-test/test2/file1.txt]/ensure: change from absent to file failed: Could not set 'file' on ensure: Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}

My actual code below

class platform::configuration::test1 {

  file { "/opt/pe-platform-test/test2":
    ensure  => "directory",
    source  =>  "puppet://puppetmaster.sample.net/puppet_plat_shared/environment",
    source_permissions=>"use",
    ignore  => [".svn"],
    replace => "true",
    recurse => "remote",
  }

}

Upvotes: 1

Views: 92

Answers (1)

Robo
Robo

Reputation: 1032

The word "environment" is a reserved word in Puppet 4.x, you can try wrapping the source in single quotes or changing the name of the directory?

Upvotes: 1

Related Questions