Puppet: System Administration Automated

Support

Ticket #790 (closed enhancement: wontfix)

Opened 1 year ago

Last modified 1 year ago

Resource aliases do not work in the parser

Reported by: ctrlaltdel Assigned to: luke
Priority: low Milestone: unplanned
Component: language Version: 0.23.2
Severity: normal Keywords: alias subclass scope
Cc: Triage Stage: Needs design decision
Attached Patches: None Complexity: Unknown

Description

This code raises an error when run by puppet.

err: Could not find object(s) File[test-module]

class module::base {
  file {"/tmp/test-module":
    alias   => test-module,
    content => "module::base",
  }
}

class module::specific inherits module::base {
  File[test-module] {
    content => "module::base2",
  }
}
include module::specific

It looks like a difference between the scope of resource aliases and the scope of resource names.

Change History

08/28/07 19:19:02 changed by ctrlaltdel

  • priority changed from normal to low.
  • type changed from defect to enhancement.

Luke advised to use the already existing title/name attributes to handle that problem without aliases.

class module::base {
  file {test-module:
    name    => "/tmp/test-module",
    content => "module::base",
  }
}

class module::specific inherits module::base {
  File[test-module] {
    content => "module::base2",
  }
}
include module::specific

09/04/07 23:28:15 changed by michael

  • stage changed from Unreviewed to Needs design decision.

09/04/07 23:44:46 changed by michael

There are three ways to specify names. The name, title, and alias. The alias only works in the library. A design decision needs to be made about 'alias.'

11/24/07 06:41:41 changed by luke

  • status changed from new to closed.
  • summary changed from Resource aliases not working in subclasses to Resource aliases do not work in the parser.
  • resolution set to wontfix.
  • milestone set to unplanned.

This is more about aliases working in the parser, not just during transactions. This isn't really an important feature, but it shouldn't actually be that hard to add, now that we have a configuration in the parse process.