Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5297

Identically named parameters on class

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • Language
    • None

    Description

      Looking at the puppet-community collectd module I came across something that thoroughly confused me: https://github.com/puppet-community/puppet-collectd/blob/29dd796685469b3dc74a973eefca62ac1ed6e27f/manifests/init.pp#L21-L25

      As you can see, the version parameter is defined twice, once with a params lookup, the other time set to installed. Contrary to my expectations this actually compiles. Had this been an actual variable that you tried to define twice Puppet would violently complain.

      I expect Puppet not to allow this. It's surprising, a bug (imho) and it's not clear which of the two would win in the case the parameter is not explicitly passed in.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daenney Daniele Sluijters
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support