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

Incorrect Warning issued when assigning $noop as class variable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.4.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      If you set a class variable named $noop you will receive a Warning message that it will affect all contained resources. However it actually won't do that.

      $ cat testnoop.pp 
      class testnoop(
        $noop = true,
      ) {
       
        file { '/tmp/testnoop.txt': 
          ensure  => present,
          content => 'should not be created',
        }
      }
       
      include testnoop
       
      $ puppet apply testnoop.pp 
      Warning: noop is a metaparam; this value will inherit to all contained resources in the testnoop definition
      Notice: Compiled catalog for geode in environment production in 0.22 seconds
      Notice: /Stage[main]/Testnoop/File[/tmp/testnoop.txt]/ensure: created
      Notice: Finished catalog run in 0.23 seconds
      

      Nigel indicates this should work at: https://projects.puppetlabs.com/issues/6526

      However this indicates you don't want this to work: https://projects.puppetlabs.com/issues/7793

      It seems you should pick an answer. Right now you are telling me that it will affect these resources, but it doesn't.

      I would also argue that it shouldn't be a Warning.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jorhett Jo Rhett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support