Puppet: System Administration Automated

Testing tags and virtual resources


In talking with Chris MacLeod about documenting exported and collected resources, he had questions about tags. I was pretty sure I'd set the query language up to compare both tag attributes and the tags on the instance (which are different), but I wanted to test.

So I used this code:

class testing {
    @notify { "this is a test": }
}
include testing
Notify <| tag == testing |>

Unfortunately, this produced no output, meaning that it was not matching against tags acquired from enclosing classes (because the notify is in the testing class, it should be tagged with testing). If I use normal attributes, it works fine:

class testing {
    @notify { "this is a test": tag => testing }
}
include testing
Notify <| tag == testing |>

Produces:

notice: this is a test

Disappointing, because it means that tags aren't working as I expected. Drat, found a bug, and it's unlikely to make it into this release.

add to del.icio.us Add to Blinkslist add to furl Digg it add to ma.gnolia Stumble It! add to simpy seed the vine TailRank post to facebook

Wed, 21 Nov 2007 | Tags: , , ,