The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #4459

alias for resource can't be used with realize

Added by Kjetil Torgrim Homme over 4 years ago. Updated 10 months ago.

Status:AcceptedStart date:08/03/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:functions
Target version:-
Affected Puppet version:0.25.5 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-1792


Description

It seems a resource alias is only usable in dependencies. Example:

@package {"coreutils": alias => "foo", ensure => installed }
realize Package["foo"]

Result:

Failed to realize virtual resources Package[foo] on node feh

I would expect it to work. Testing was done on 0.25.5.


Related issues

Related to Puppet - Bug #12779: Resource Alias and Relationship Chaining Error Accepted 02/22/2012

History

#1 Updated by Joe McDonagh over 4 years ago

I can tell you that this will work:

@file { "/tmp/foo": ensure => "present", alias => "foobar" }
File <| alias == "foobar" |>

It’s the specific syntax of using ‘alias’ in place of ‘name’ that doesn’t work.

#2 Updated by Nick Lewis over 4 years ago

  • Affected Puppet version set to 0.25.5

#3 Updated by James Turnbull over 4 years ago

  • Category set to functions
  • Status changed from Unreviewed to Accepted
  • Target version set to 2.7.x

#4 Updated by Mathieu Bornoz about 2 years ago

Any news on this issue? Do you consider that using the “spaceship” operator is the solution?

Testing was done on Puppet 2.7.19.

#5 Updated by Anonymous almost 2 years ago

  • Target version deleted (2.7.x)

#6 Updated by Jason Smith 10 months ago

Redmine Issue #4459 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PUP-1792

Also available in: Atom PDF