Puppet: System Administration Automated

Support

Ticket #1221 (new defect)

Opened 6 months ago

Last modified 6 months ago

adding an alias to a resource with the same name as that resource causes warning

Reported by: technogeeky Assigned to: technogeeky
Priority: normal Milestone:
Component: Debian Version: 0.24.4
Severity: normal Keywords: alias resource "already defined" "duplicate definition"
Cc: Triage Stage: Accepted
Attached Patches: Insufficient Complexity: Unknown

Description

In the case where $fqdn and $hostname are identical,

node base {
	host { "$fqdn":
		ip => "$ipaddress",
		alias => [ "$hostname" ],
		ensure => present,
	}
}

produces an error message similar to:

warning: Configuration could not be instantiated: Duplicate definition: Host[foo] is already defined in file /etc/puppet/manifests/nodes/BASE.pp at line 18; cannot redefine

It seems that, rather than producing a warning, the code should eventually evaluate to a noop.

Attached is a patch that I believe does just that. An accompanying test will be forthcoming.

Attachments

catalog.rb.patch (0.6 kB) - added by technogeeky on 05/15/08 02:03:17.

Change History

05/15/08 02:03:17 changed by technogeeky

  • attachment catalog.rb.patch added.

05/16/08 09:41:52 changed by jamtur01

  • owner changed from community to technogeeky.
  • stage changed from Unreviewed to Accepted.
  • patch changed from Code to Insufficient.