Problem using exported resources with tag => $variable

130 views
Skip to first unread message

Cosmin-Viorel Ilie

unread,
Oct 31, 2012, 11:14:06 AM10/31/12
to puppet...@googlegroups.com
Does anyone know if using variable as tag values is permitted in puppet 2.7.19

Here is my example :

 @@custom_define { 'export':
          tag             => $variable,
     }

Custom_define <<| tag == $variable |>>

If i set the tag to a string (e.g   tag => 'tag1',)  it works without problems, however if i use a variable the exported resource is not applied.

Thanks,
Cosmin 

Bernd Adamowicz

unread,
Oct 31, 2012, 11:59:05 AM10/31/12
to puppet...@googlegroups.com

This could be a scope issue. You may want to try $::variable or some other prefix depending on where this variable actually is defined.

 

See: http://docs.puppetlabs.com/guides/scope_and_puppet.html

 

Bernd

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/xBal_C1wqycJ.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Jeff McCune

unread,
Oct 31, 2012, 12:20:58 PM10/31/12
to puppet...@googlegroups.com
On Wed, Oct 31, 2012 at 8:14 AM, Cosmin-Viorel Ilie <ilie.cosm...@gmail.com> wrote:
Does anyone know if using variable as tag values is permitted in puppet 2.7.19

Yes, this should definitely work.  If it doesn't please consider filing a bug at http://projects.puppetlabs.com/projects/puppet with an example that reproduces the problem.

There may already be a bug filed on this issue.

-Jeff
Reply all
Reply to author
Forward
0 new messages