example42 / puppet-yum

Puppet module for Yum
Other
43 stars 116 forks source link

When multiple other modules reference this module with the same definitions, collisions occur. #155

Closed rcalixte closed 8 years ago

rcalixte commented 8 years ago

Expected Behavior

Each repo and yumrepo should only be declared once.

Actual Behavior

When multiple other modules add a repo of the same name in their code, collisions occur on compilation.

Steps to Reproduce the Problem

  1. Add multiple other modules to Puppetfile (creating custom modules would suffice) that defined the same resource - Yumrepo['epel'] as a example
  2. Puppet will generate the following error on compilation: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Yumrepo[epel] is already declared in file /etc/puppet/modules/epel/manifests/init.pp:90; cannot redeclare at /etc/puppet/modules/yum/manifests/managed_yumrepo.pp:80 on node

    Specifications

Affects all versions and clients. (A PR has been opened on the epel module as well.)

Please add this info:

  1. Output of facter -p on the failing node (at least the OS related facts)

    operatingsystem => RedHat operatingsystemmajrelease => 7 operatingsystemrelease => 7.2 os => {"name"=>"RedHat", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"2", "full"=>"7.2"}} osfamily => RedHat

  2. Version of Puppet and of the module

    Puppet 3.8 v2.1.21

  3. The relevant Puppet code and eventually Hiera data

    https://github.com/stahnma/puppet-module-epel/pull/54

rcalixte commented 8 years ago

Merged in #156.