Puppet manifest has a file declaration that somehow duplicates itself

前端 未结 4 1901
陌清茗
陌清茗 2020-12-21 07:06

Given the confusing error message:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: File[/etc/logstas

4条回答
  •  萌比男神i
    2020-12-21 07:32

    I faced with the same kind of issue when I used create_resource().

    This error occurs when you want to run 'file{}' block several times like a loop.

    When we are creating a multiple copies of a 'file{}' block, we have to make sure that the NAME OF THE FILE BLOCK is unique, i.e.,

    file { "NAME OF THE FILE BLOCK":.....}

    If the same name repeats, the above error is raised.

    In your case, some value of "${logstash::params::config_dir}" must have been repeated twice.

提交回复
热议问题