傀儡代理重复文件

问题描述

我有一台安装了 puppet 代理的机器。 当我尝试运行 puppet 代理时,出现此错误。 我已经尝试使用该属性强制文件,但这不起作用。 指示的模块不是我管理的,它是第三方模块。

我的文件.pp:

class icarrierdata_Nginx::files inherits icarrierdata_Nginx::params {
  $source_base = "puppet:///modules/${module_name}"

  if ! defined(File['/etc/Nginx/Nginx.conf']) {
    file { 'Nginx_config_file':
    ensure => present,content => template("${module_name}/Nginx.conf.erb"),owner => 'root',group => 'root',notify => [Service['Nginx']],force  =>  true,path   =>  "/etc/Nginx/Nginx.conf",}
  }
}

这是错误

Error: Could not retrieve catalog from Remote Server: Error 500 on SERVER: Server Error: 
Evaluation Error: Error while evaluating a Resource Statement,Duplicate declaration: 
File[/etc/Nginx/Nginx.conf] is already declared at (file: 
/etc/puppetlabs/code/environments/staging/modules/icarrierdata_Nginx/manifests/files.pp,line: 5); cannot redeclare (file: 
/etc/puppetlabs/code/environments/staging/modules/Nginx/manifests/config.pp,line: 238) 
(file: /etc/puppetlabs/code/environments/staging/modules/Nginx/manifests/config.pp,line: 
238,column: 3) on node stg-data-odatos-proxy-us-central1.c.scorpius-odatos.internal
Warning: Not using cache on Failed catalog
Error: Could not retrieve catalog; skipping run

有人可以帮助我吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)