Directory 木偶同步目录

Directory 木偶同步目录,directory,centos,puppet,Directory,Centos,Puppet,还是不行 在/etc/puppet/manifests/site.pp中 file { "/home/render/installation/": ensure => "directory", owner => "render", group => "render", recurse => "true", mode => "0750", source => "puppet:///files/installation/

还是不行 在/etc/puppet/manifests/site.pp中

file { "/home/render/installation/":  
 ensure => "directory",  
 owner  => "render",  
 group  => "render",  
 recurse => "true",  
 mode   => "0750",  
 source => "puppet:///files/installation/",  
 }
客户端上的Dir仍然为空

ls /etc/puppet/files/installation/
1  2  3  4  5
关于日志中的puppet客户端

Mar 21 12:28:12 lw-003 puppet agent[28098]:(/File[/home/render/installation/])无法使用“eval_generate:Error 400”在服务器上生成其他资源:未授权使用{:checksum_type=>“md5”,:recurse=>true,:links=>“manage”}调用/File_元数据/files/installation上的搜索

三月21日12:28:12 lw-003傀儡代理[28098]:(/File[/home/render/installation/])无法评估:服务器上出现错误400:无权调用/File\u metadata/files/installation上的查找无法检索的文件元数据puppet:///files/installation: 服务器上出现错误400:未授权在/file\u metadata/files/installation上调用find 3月21日12:28:12 lw-003傀儡代理[28098]:在0.28秒内完成目录运行 试一试这个例子,

  file {
    "/scratch/usern/testmod" :
      ensure => directory,
      source => "puppet:///files/testmod",
      recurse => true,
      owner => "usern",
      group => "groupn",
      mode => "0775",
      backup => false,
  }
您必须指定'files',如果要进行递归复制,请指定'recurse=>true'。这可能是你问题的解决办法

“fileserver.conf”的外观应如下所示:

]# cat /etc/puppet/fileserver.conf
   [files]
     path /etc/puppet/files
     allow *

我也有同样的问题,在谷歌上发现了这个问题。我必须更改清单文件的路径(modulename/manifests/init.pp):

致:

不带/modules/的符号在2.7中已被弃用,并且在较新版本中不再受支持:

DEPRECATION NOTICE: Files found in modules without specifying 'modules' in file path will be deprecated in the next major release.  Please fix module 'modulename' when no 0.24.x clients are present 

在您的案例中,fileserver.conf是什么样子的?我在回答中加了一个例子。你的头发看起来相似吗?
"puppet:///modules/files/installation/",  
DEPRECATION NOTICE: Files found in modules without specifying 'modules' in file path will be deprecated in the next major release.  Please fix module 'modulename' when no 0.24.x clients are present