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

Resource defaults and automatic tags are applied after collectors are evaluated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Won't Do
    • None
    • None
    • Compiler

    Description

      Resources (and virtual resources) are not having their classes declared tags correctly applied. ("Add the specified tags to the containing class or definition. All contained objects will then acquire that tag, also." ref: http://docs.puppetlabs.com/references/latest/function.html#tag)

      class foo {
          tag 'notworking'
          notify { "I'm untagged": }
          notify { "I'm tagged": tag => "notworking" }
      }
      include foo
      Notify <| tag == "notworking" |> { message => "I am though" }
      

      Results in:

      mauve /home/jbooth > puppet tagmagic.pp
      notice: I am though
      notice: //foo/Notify[I'm tagged]/message: defined 'message' as 'I am though'
      notice: I'm untagged
      notice: //foo/Notify[I'm untagged]/message: defined 'message' as 'I'm untagged'
      

      You can change the 'tag == "foo"' and life doesn't get any better. The neither notify gets the message changed.

      mauve /home/jbooth > tail -1 tagmagic.pp 
      Notify <| tag == "foo" |> { message => "I am though" }
      mauve /home/jbooth > puppet tagmagic.pp
      notice: I'm untagged
      notice: //foo/Notify[I'm untagged]/message: defined 'message' as 'I'm untagged'
      notice: I'm tagged
      notice: //foo/Notify[I'm tagged]/message: defined 'message' as 'I'm tagged'
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            redmine.exporter redmine.exporter
            Kurt Wall Kurt Wall
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support