I have encountered what might be a bug in the package resource type. I'm
using puppet 0.25.5 so perhaps it has been fixed in a later version.

The problem involves installing a package from two different providers
(e.g.: apt and get) with the same name in the provider's environment. For
example, suppose I want puppet to perform the equivalent of "apt-get install
foo" and "gem install foo" on the same server.  I might write:

  package { "foo":
    provider => "apt",
    ensure => installed,
  }
  package { "foo":
    provider => "gem",
    ensure => installed,
  }

That will not work; puppet correctly reports that Package[foo] is multiply
defined. To solve that, I change the title of both resources:

  package { "apt_foo":
    name => "foo",
    provider => "apt",
    ensure => installed,
  }
  package { "gem_foo":
    name => "foo",
    provider => "gem",
    ensure => installed,
  }

This does not work either. Puppet gives the error "Error 400 on SERVER:
Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias
Package[gem_foo] to foo; resource Package[foo] already exists."

It says "resource Package[foo] already exists" but it does not.
Package[gem_foo] and Package[apt_foo] exist. Is this a bug in the package
resource/puppet or am I confused about something?

Thanks,

Barry

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

Reply via email to