Puppet error on already installed package on centos

I am using puppet on CentOS for the first time.

I have the following in one of my .pp files:

package {"openjdk-6-jdk":
    ensure => installed,
}

Which generates the following error when applied:

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install openjdk-6-jdk' returned 1: Error: Nothing to do

Error: /Stage[main]/Play/Package[openjdk-6-jdk]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install openjdk-6-jdk' returned 1: Error: Nothing to do

Swapping installed for latest yields the same result.

package {"openjdk-6-jdk":
    ensure => latest,
}

How do I tell puppet that yum returning 1 here is okay?

I figured the puppet yum adapter would know how to handle this result code already.

This seems super basic and something that should "just work".

This is on Centos 6.3 with puppet 3.1.1-1.el6


As posted in my comment, the package name was wrong. Here is how I fixed it to install on Ubuntu and CentOS.

package {"openjdk-6-jdk":
 ensure => installed,
 name => $operatingsystem ? {
   Ubuntu => "openjdk-6-jdk",
   CentOS => "java-1.6.0-openjdk",
 }
}