Issue #6696 has been updated by Nigel Kersten.

James Turnbull wrote:
> Think I've already indicated that - tags returns "bob" with the function but 
> not "files" which means it's returning all the tags in scope.  The code for 
> tags and all_tags is incredibly simple:

No, I think you missed what I was saying.

Take this simpler manifest

<pre>
cat /tmp/test.pp 
class test {
    file { "/tmp/foo":
      ensure  => file,
      content => "foo",
      tag     => "files",
    }
}

include test
</pre>

<pre>
kripke:~ nbk$ rm -f /tmp/foo; puppet -v --tags notfiles /tmp/test.pp 
info: Applying configuration version '1300152210'
kripke:~ nbk$ rm -f /tmp/foo; puppet -v --tags files /tmp/test.pp 
info: Applying configuration version '1300152215'
notice: /Stage[main]/Test/File[/tmp/foo]/ensure: defined content as 
'{md5}acbd18db4cc2f85cedef654fccc4a4d8'
</pre>

The metaparam is functional. There's an issue with the tags/all_tags functions 
or ordering or something going on.
----------------------------------------
Bug #6696: tag metaparam not working
https://projects.puppetlabs.com/issues/6696

Author: James Turnbull
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category: tags
Target version: 
Affected Puppet version: 2.6.6
Keywords: 
Branch: 


Given a manifest:

<pre>
class test {
    
    tag("bob")
    file { "/tmp/test":
      ensure  => present,
      content => template('/tmp/filet'),
      tag     => "files",
    }
}

include test
</pre>

With the template:

<pre>
<% tags.each do |tag| -%>
The tag <%= tag %> is part of the current scope
<% end -%>

<% all_tags.each do |tag| -%>
The tag <%= tag %> is defined
<% end -%>
</pre>

When I run either:

<pre>
puppet --tags files /tmp/file.pp
</pre>

or:

<pre>
puppet /tmp/file.pp
</pre>

I get:

<pre>
The tag class is part of the current scope
The tag test is part of the current scope
The tag bob is part of the current scope

The tag settings is defined
The tag class is defined
The tag test is defined
</pre>

No sign of the tag "files" anywhere.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to