【问题标题】:Puppet syncing dir木偶同步目录
【发布时间】:2013-03-15 12:41:25
【问题描述】:

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

file { "/home/render/installation/":  
 ensure => "directory",  
 owner  => "render",  
 group  => "render",  
 recurse => "true",  
 mode   => "0750",  
 source => "puppet:///files/installation/",  
 }

客户端上的目录仍然为空

ls /etc/puppet/files/installation/
1  2  3  4  5

在日志中的傀儡客户端

3 月 21 日 12:28:12 lw-003 puppet-agent[28098]: (/File[/home/render/installation/]) 无法使用“eval_generate”生成其他资源:服务器上出现错误 400:未授权使用 {:checksum_type=>"md5", :recurse=>true, :links=>"manage"}

在 /file_metadata/files/installation 上调用搜索

3 月 21 日 12:28:12 lw-003 puppet-agent[28098]: (/File[/home/render/installation/]) 无法评估:服务器上的错误 400:无权调用 /file_metadata 上的查找/files/installation 无法检索 puppet:///files/installation 的文件元数据:服务器上的错误 400:无权调用 /file_metadata/files/installation 上的查找 3 月 21 日 12:28:12 lw-003 puppet-agent[28098]:在 0.28 秒内完成目录运行

【问题讨论】:

    标签: directory centos puppet


    【解决方案1】:

    我遇到了同样的问题,并在 Google 上找到了这个问题。我不得不更改清单文件的路径(模块名/清单/init.pp):

    "puppet:///files/installation/",  
    

    到:

    "puppet:///modules/files/installation/",  
    

    没有 /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 
    

    【讨论】:

      【解决方案2】:

      试试这个例子,

        file {
          "/scratch/usern/testmod" :
            ensure => directory,
            source => "puppet:///files/testmod",
            recurse => true,
            owner => "usern",
            group => "groupn",
            mode => "0775",
            backup => false,
        }
      

      您必须指定“文件”,如果您正在执行递归复制,请指定“recurse => true”。这可能是您问题的解决方案。

      “fileserver.conf”应如下所示:

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

      【讨论】:

      • fileserver.conf 在您的情况下看起来如何?我在答案中添加了一个示例。你长得像吗?
      猜你喜欢
      • 1970-01-01
      • 2015-03-09
      • 2017-12-14
      • 2019-07-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-12
      • 2014-03-23
      相关资源
      最近更新 更多