【问题标题】:Facing issues with File resouce with folder name called "environment" in puppet在 puppet 中使用名为“environment”的文件夹名称的文件资源面临问题
【发布时间】:2016-06-15 03:30:50
【问题描述】:

我正在尝试使用内置文件服务器将文件从 puppet master 递归传输到我的代理。

我有一个名为“环境”的文件夹名称,它没有转移给我的代理。相反,我收到以下错误

 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"}

下面是我的实际代码

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",
  }

}

【问题讨论】:

  • 请指定您使用的 puppet 版本以及任何相关的fileserver.conf 设置。

标签: file resources puppet fileserver puppet-enterprise


【解决方案1】:

“环境”一词是reserved word in Puppet 4.x,您可以尝试将源代码用单引号括起来或更改目录名称?

【讨论】:

  • 你能清楚地解释一下用单引号括起来的源代码吗?
猜你喜欢
  • 1970-01-01
  • 2017-05-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多